Focal Point
Question on tab components

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4187087116

October 28, 2011, 04:14 PM
j.gross
Question on tab components
Is there a way for a javascript function to sense which of a set of tabs (created by HTML Composer, 7.7.03) is currently selected?

I can keep track once there is a click event; but is there a simple way to sense the initial status, on load, of each tabset?
November 01, 2011, 10:03 PM
j.gross
45 views, no responses. Confused
November 01, 2011, 11:51 PM
njsden
At least you catched our interest on the subject Wink Sadly nobody seems to know the answer yet ... I know I don't Frowner Sorry.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 02, 2011, 10:52 AM
Kofi
jgross,

You can be doing something like -
  var tabs = document.getElementsByTagName("SPAN");
  alert(tabs.length);
  for(var i = 0; i < tabs.length; i++) {
    if(tabs[i].elementtype == "40") {
      alert(tabs[i].id+" - "+tabs[i].style.display);
    }
  }

The style.display will be giving you whether the tab content SPAN is being displayed or not and it then be the one selected.

but you will have to be making sure that the DOM has necessary content menaing the page is being fuly loaded.

Note that the first tab is not appearing to have the same sort of span?

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
November 02, 2011, 12:25 PM
Ram Prasad E
If you want to verify this during page load, you can try assigning same html file as a DOM object and traverse down to validate the SPAN tag attribute 'selectedtab="true"'.
true says the tab is selected.


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
November 02, 2011, 12:42 PM
Kofi
Ram,

The value for "selectedtab" is not being changed if other tab being selected. It is being used in startup only for showing default tab.

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
November 02, 2011, 12:51 PM
Ram Prasad E
Hi Kofi,
Even j.gross in interested to do startup load validation.

-Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/