NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
How do I run a piece of code on the server when a user pressess a menu button ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How do I run a piece of code on the server when a user pressess a menu button ? (Read 2842 times)
MikeR
Sr. Member
Posts: 265
How do I run a piece of code on the server when a user pressess a menu button ?
«
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')
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: How do I run a piece of code on the server when a user pressess a menu button ?
«
Reply #1 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
Logged
MikeR
Sr. Member
Posts: 265
Re: How do I run a piece of code on the server when a user pressess a menu button ?
«
Reply #2 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 ?
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: How do I run a piece of code on the server when a user pressess a menu button ?
«
Reply #3 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
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
How do I run a piece of code on the server when a user pressess a menu button ?