NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: springguy on April 01, 2016, 07:30:01 PM
-
NetTalk 8.62
On a Form with Tabs (Tab type), is there a way to choose which tab is open when the form is opened? On the basis of a session value when the form is called, I'd like to have the form open with a specific tab opened depending on that session value.
Mike Springer
-
set the sessionvalue;
p_web.SetSessionValue('showtab_ProcedureName',n)
where n is the tab number to display. Be aware that tabs are numberd from 0, not 1.
Do this in the PreInsert or PreUpdate routine.
cheers
Bruce
-
Bruce,
This doesn't seem to work for me. I am definitely in a "change record" mode and the tab I am wanting to be set on opening the form is the third physical tab (tab # 2), and I have the p_web.SSV('showtab_UpdateMyActions',2) in the PreUpdate routine, but it still opens with tab 0.
I'm wondering if the problem is that the templates are forcing the tab to tab 0 in spite of the embed code in the PreUpdate (or PreInsert) routine. I say this because the following pattern shows up in the template code:
of Net:ChangeRecord + NET:WEB:StagePre
p_web.setsessionvalue('SaveReferUpdateMyActions',p_web.getPageName(p_web.RequestReferer))
do StoreMem
do PreUpdate
p_web.setsessionvalue('showtab_UpdateMyActions',0)
It looks like the template is forcing Tab 0 automatically AFTER the PreUpdate routine. Same in other stages, too.
Am I misunderstanding this, or is there a way around this so I can force the desired tab on opening the page?
Mike Springer