NetTalk Central

Author Topic: TAB title is session variable - how to update?  (Read 2309 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
TAB title is session variable - how to update?
« 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

JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: TAB title is session variable - how to update?
« Reply #1 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


DonnEdwards

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Insights and Rants
    • Email
Re: TAB title is session variable - how to update?
« Reply #2 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?
If you're happy with your security, then so are the bad guys

JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: TAB title is session variable - how to update?
« Reply #3 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: TAB title is session variable - how to update?
« Reply #4 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

JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: TAB title is session variable - how to update?
« Reply #5 on: June 24, 2021, 10:24:16 PM »
Hi Bruce

Magic!
Will let you know if I manage

cheers,

Johan


JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: TAB title is session variable - how to update?
« Reply #6 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





Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: TAB title is session variable - how to update?
« Reply #7 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')

JohanR

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: TAB title is session variable - how to update?
« Reply #8 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