I was looking to get a tabpanel's active tab value using javascript. Is there a way to do this?
I see a getelementvalue to retrieve the value, but not sure how to access other properties of a widget (tabpanel specifically)
Thanks!
javascript to get an element property?
-
- Profound User
- Posts: 29
- Joined: Fri Feb 08, 2013 8:34 am
- First Name: howard
- Last Name: Arner
- Company Name: Citco Sys
- State / Province: Georgia
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: javascript to get an element property?
Something like this should work:
Does that help?
Code: Select all
var myPanel = getObj("TabPanel1");
if (myPanel==null || myPanel.tabPanel == null || myPanel.tabPanel.selectedTab == null) {
// handle error: tab panel not found, or id is found but is not a tab panel.
}
var myTabNo = myPanel.tabPanel.selectedTab;
// myTabNo is now set to the tab number....
-
- Profound User
- Posts: 29
- Joined: Fri Feb 08, 2013 8:34 am
- First Name: howard
- Last Name: Arner
- Company Name: Citco Sys
- State / Province: Georgia
- Country: United States
- Contact:
Re: javascript to get an element property?
Yes it does.
Thanks once again Scott!
Thanks once again Scott!
Who is online
Users browsing this forum: No registered users and 6 guests