NetTalk Central

Author Topic: Execute a piece of code once in a net web browse  (Read 2056 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • Email
Execute a piece of code once in a net web browse
« on: April 23, 2012, 05:14:59 AM »
I have a bog standard NetWebBrowse.
I want to execute a piece of code Once and only once before showing the table contents
The contents can be refreshed only by request of the user.

What embed point do I use ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Execute a piece of code once in a net web browse
« Reply #1 on: April 23, 2012, 09:08:56 AM »
Top of the Generate Browse routine.

But if you want to limit the code to running only once, I guess you need to set, and test a session variable to see if you've bene here before. Somethign along the lines of

if p_web.gsv('here') = 0
  p_web.ssv('here',1)
  ! whatever else
end


MikeR

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • Email
Re: Execute a piece of code once in a net web browse
« Reply #2 on: April 23, 2012, 12:30:07 PM »
Thanks Bruce ,
does Top of Generate Browse Routine execute when the browser requests the next page ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Execute a piece of code once in a net web browse
« Reply #3 on: April 23, 2012, 09:20:31 PM »
Hi Mike,

why not add a trace statement and see?

p_web._trace('top of generate browse')

Then watch the output in DebugView. (www.sysinternals.com)

Cheers
Bruce