NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on April 04, 2009, 11:43:49 AM

Title: Menu On Click
Post by: Alberto on April 04, 2009, 11:43:49 AM
Hi,

I dont understand...
I need to clear a Session variable when I click on a menu option.
I dont know exactly if this is the better approach but, follow me...

I add p_web.ssv('MyVariable','') at the On click in the menu option

One of my browses sets p_web.ssv('MyVariable','becarefull') before calling a form.
When I enter the form, if the on click at the menu _is set_, then the p_web.gsv('MyVariable') is always blank.
If I clear the OnClick code, the p_web.gsv('MyVariable') on the form is 'becarefull'

I´m really confused, because I did not click on the menu option and the p_web.ssv('MyVariable','') code executes when I press the insert button on a browse, and this browse has nothing to do with the one in the menu option.

Any Idea?, and if not... how do I clear a session variable when cliking a menu option?

Thanks
Alberto


Title: Re: Menu On Click
Post by: Bruce on April 04, 2009, 10:56:41 PM
The OnClick is for Javascript code - not clarion code.
Because the user clicks in the browser.

The right way to do what you're doing is to pass the value as a parameter to the URL.
ie BrowseWhatever?Freddie=0
Then in the BrowseWhatever procedure, in the GenerateBrowse routine "store" the value passed. ie
  p_web.StoreValue('Freddie')

Cheers
Bruce