NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: JohanR on June 20, 2021, 02:12:39 AM

Title: TAB title is session variable - how to update?
Post by: JohanR on June 20, 2021, 02:12:39 AM
Hi,

My tab titles is a session variable.
The tabs are not available as fields to update via the client side RESET list

How do I update it on the fly?


thanks

Johan
Title: Re: TAB title is session variable - how to update?
Post by: JohanR on June 20, 2021, 03:58:13 AM
Hi,

I created and EQU for the tab and added it to the client side RESET list,
but no luck


Johan

Title: Re: TAB title is session variable - how to update?
Post by: DonnEdwards on June 24, 2021, 04:49:19 AM
Is it a button on the same form as the Tab title that is causing the session variable to update?
Title: Re: TAB title is session variable - how to update?
Post by: JohanR on June 24, 2021, 09:54:51 AM
Hello DonnEdwards

Not a button specifically, there are fields on the form that change and that influences the TAB label/text

I did get it working with some of the Tab types but not all and I know Bruce is looking at a possible plan

I am specifically trying to get it working with the accordion tab



regards

Johan
Title: Re: TAB title is session variable - how to update?
Post by: Bruce on June 24, 2021, 07:15:50 PM
Hi Johan,

noting that you are using the Accordion tab is a useful detail.
That said, in the 12.20 build which is now up I've added some documentation (and code) for the JavaScript widget to do this. See
https://www.capesoft.com/docs/NetTalk12/NetTalkWebBasic.htm#ntFormWidget

By using this code it should work, regardless of the tab type.

Cheers
Bruce
Title: Re: TAB title is session variable - how to update?
Post by: JohanR on June 24, 2021, 10:24:16 PM
Hi Bruce

Magic!
Will let you know if I manage

cheers,

Johan

Title: Re: TAB title is session variable - how to update?
Post by: JohanR on June 24, 2021, 11:39:07 PM
Hi Bruce

Unsure of how to specify which TAB gets the altered header?

Assuming this is the correct one to use

setTabHeadingText   Set the heading text for a tab   
p_web.ntForm(loc:formname,'setTabHeadingText','Some heading')


thanks

Johan




Title: Re: TAB title is session variable - how to update?
Post by: Bruce on June 25, 2021, 01:12:36 AM
As discussed in yesterday's webinar, (https://www.youtube.com/watch?v=5AIBj6qrpk0)
the doc is inaccurate. It should read;

p_web.ntForm(loc:formname,'setTabHeadingText',index,'Some heading')
Title: Re: TAB title is session variable - how to update?
Post by: JohanR on June 25, 2021, 03:12:09 AM
Hi Bruce

I have tried , but it's not happy with the extra parameter
I also tried to switch around the parameter in case the sequence caused a type issue

No matching prototype available - C:\dev\C10\tvcweb\tvcweb135.clw:2604,18
No matching prototype available - C:\dev\C10\tvcweb\tvcweb135.clw:2605,18
No matching prototype available - C:\dev\C10\tvcweb\tvcweb135.clw:2606,18
No matching prototype available - C:\dev\C10\tvcweb\tvcweb135.clw:2607,18
No matching prototype available - C:\dev\C10\tvcweb\tvcweb135.clw:2608,18

     p_web.ntForm(loc:formname,'setTabHeadingText',0,'Some heading')     
     p_web.ntForm(loc:formname,'setTabHeadingText',1,'Another heading Some heading')     
     p_web.ntForm(loc:formname,0,'setTabHeadingText','Some heading')     
     p_web.ntForm(loc:formname,1,'setTabHeadingText','Another heading Some heading')     
     p_web.ntForm(loc:formname,'setTabHeadingText',index,'Some heading')     

regards

Johan