Access to tab names on tab panel

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
leatherlips
Profound User
Posts: 83
Joined: Sun Oct 03, 2010 8:45 am
First Name: Mike
Last Name: Geldert
Company Name: Stonriver
Country: Angola
Contact:

Access to tab names on tab panel

Post by leatherlips »

Using javascript, I'd like to access the name of the tab when it's clicked.
I assume I'd use ontabclick which will have the index, but I"m not sure how to access the specific name of the tab?
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Access to tab names on tab panel

Post by David »

There is not a way to get these directly using JavaScript. If you really need to do this, though, you could create an array in JavaScript that maps the tab index numbers to the appropriate tab name.

An easy way to make this maintainable would be to use a bound field to populate the tab names property. You could then bind the same field to a hidden field to get the tab names on the screen where you can read them through JavaScript.

You could split the value on the comma to produce an array of tab names ordered by the tab sequence number.
leatherlips
Profound User
Posts: 83
Joined: Sun Oct 03, 2010 8:45 am
First Name: Mike
Last Name: Geldert
Company Name: Stonriver
Country: Angola
Contact:

Re: Access to tab names on tab panel

Post by leatherlips »

Thanks Much!
BTW, in order to use pui.click on a button, does it have to be "visible"? (in my testing that seems to be the case).
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Access to tab names on tab panel

Post by David »

I ran a quick test -- it actually does seem to work for me on buttons that are not visible.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests