NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: MikeR on April 23, 2012, 05:14:59 AM

Title: Execute a piece of code once in a net web browse
Post by: MikeR 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 ?
Title: Re: Execute a piece of code once in a net web browse
Post by: Bruce 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

Title: Re: Execute a piece of code once in a net web browse
Post by: MikeR on April 23, 2012, 12:30:07 PM
Thanks Bruce ,
does Top of Generate Browse Routine execute when the browser requests the next page ?
Title: Re: Execute a piece of code once in a net web browse
Post by: Bruce 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