NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: sukhendu on March 26, 2012, 09:19:07 AM
-
Looking for an embed point on the Page Header when a menu is clicked is clicked.
I have two Browse Menus on the page header and both point to BrowseClients. Clients table has CLIType byte field. I want to pass CLIType when a Browse Menu is clicked.header.
I put this code in --- Menu Item --- 'Browse' --- 'Customer' ! Start of "Before Menu Item" ! [Priority 5000]
p_web.SetSessionValue('aCLIType',1)
And !--- Menu Item --- 'Browse' --- 'Supplier/Producer' ! Start of "Before Menu Item" ! [Priority 5000]
p_web.SetSessionValue('aCLIType',2)
But CLIType becomes 2 no matter which browse is selected.
Thanks,
Sukhendu
-
Hi Sukhendu,
It's always 2, because those embeds you are embedding in are done when the menu is generated, not when it's clicked.
there are no embeds when it clicks, because the click itself does something. If there was an embed, it would be asynchronous, and hence useless for "setting something before the menu click applies".
It sounds to me like you just need to pass a parameter to the browse. For example
'BrowseClients?aCliType=1'
and
'BrowseClients?aCliType=2'
Then in browse clients, top of GenerateBrowse routine put
p_web.StoreValue('aCliType')
then use p_web.GSV('aCliType') in your code, filters etc as normal.
cheers
Bruce
-
Thank you Bruce. Yes, I'm trying to send 1 or 2 to BrowseClients procedure.
It worked!. Can multiple values be passed using comma (like 'ProcedureName?pV1,?pV2) ?
Sukhendu
-
no, the separator is not a comma, it's a &.
So, for example;
'procedureName?parm1=hello&parm2=fred'
-
Thanks Bruce.