NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: MikeR on April 23, 2014, 04:27:45 AM

Title: How do I run a piece of code on the server when a user pressess a menu button ?
Post by: MikeR on April 23, 2014, 04:27:45 AM
before serving the form I would like to set a session variable ie. p_web.ssv('filter1','abc')
Title: Re: How do I run a piece of code on the server when a user pressess a menu button ?
Post by: Bruce on April 23, 2014, 06:33:26 AM
It doesn't work like that.
The _browser_ is opening the form from the menu item, not the server.

You can pass a parameter;
'filter1=abc'

And then in the form do a
p_web.StoreValue('filter1')

and the Session Value will then be set for you.

Cheers
Bruce
Title: Re: How do I run a piece of code on the server when a user pressess a menu button ?
Post by: MikeR on April 24, 2014, 02:48:57 AM
Thanks Bruce that makes sense.

I can set the session value in the browse from the value queue.from each menu button

I understand the session value will remain for the entire session.
The browse is also called as a lookup.
Then I would want to reset that session  value .
Is there anyway in the browse that I know its being called as a lookup ? (select)
or do I have to set the value queue  before each lookup call ?
Title: Re: How do I run a piece of code on the server when a user pressess a menu button ?
Post by: Bruce on April 24, 2014, 05:01:36 AM
when your browse is called in lookup mode then loc:selecting in the browse will be set to 1.

So if you want to do some specific behavior when it is, or isn't, in selecting mode, then just test loc:selecting.

cheers
Bruce