NetTalk Central

Author Topic: How do I run a piece of code on the server when a user pressess a menu button ?  (Read 2840 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
before serving the form I would like to set a session variable ie. p_web.ssv('filter1','abc')

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
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

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
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 ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
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