Focal Point
[SOLVED] Active Tab value into variable

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

November 30, 2009, 01:06 PM
getit
[SOLVED] Active Tab value into variable
Hi ,
I have placed a simple tab control in HTML composer. It has 2 tabs Daily and Monthy.
Is there a way to get the value of the selected tab or the active tab into a variable(Ex: &activetab) that webfocus can use to run within a fex.

Example:
I would point the two tabs to the same report but within report depending on which tab the user is in the report logic changes.


-IF &activetab = Daily
Run report Daily.

-IF &activetab = Monthly
Run report Monthly.

This message has been edited. Last edited by: Kerry,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 30, 2009, 01:41 PM
Francis Mariani
I'm not sure how WebFOCUS takes care of Tab Controls, but couldn't you insert a Hidden Control in each Tab, giving them the same Name but a different Value?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 30, 2009, 02:20 PM
getit
I tried this and it wouldn't let me give the same name in two tabs..It is creating hidden2 in second tab.
Is there a way to get the id or name of the button(Ex: button1) into the fex that it is hyperlinked to.?
Even this will solve my problem.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 30, 2009, 03:17 PM
Francis Mariani
"Is there a way to get the id or name of the button" - probably not through the GUI. I would go ahead and create two hidden controls and in the report program -DEFAULT each of them to blank. You could then determine which tab was active because only one of the two variables would have a value. These are the limitations when working with a GUI to generate an HTML page.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 01, 2009, 04:34 AM
It's Alive!
u can use a single hidden drop down box with two values... and two onclick java script functions for either tab which the corresponding value to the drop down box. the set value can be passed to the fex file.


WebFOCUS 7.1.4
UNIX
HTML,PDF,EXL2K
December 01, 2009, 07:01 AM
Danny-SRL
Getit,

Why do you want to use a TAB for this type of logic and not a simple radio button?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

December 01, 2009, 10:13 AM
Francis Mariani
It's Alive!, in the Dev Studio GUI, how do make a drop-down box hidden? The only method I can think of is via the CSS visibility property, which I set to "no" but it still is displayed.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 01, 2009, 10:31 AM
Tony A
Francis,

I generally make the combo I want to hide disabled and placed behind another combo or control with a different z-index so it is effectively "hidden" from view.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
December 01, 2009, 03:07 PM
getit
I was going in the same direction as It's Alive suggested with an input text box hidden...but somehow onclick was not working on the Tab Control. After a lot of struggle, I found onactivate works best for this.
Anyway,
Thanks all for the suggestions.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
December 01, 2009, 03:25 PM
Francis Mariani
Tony,

Thanks for the tip. I have never had to code a hidden drop-down box on a HTML page. In my opinion, if it's hidden, then it shouldn't be a drop-down box, but if that's what it takes to get the Dev Studio GUI to work, so be it.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 01, 2009, 04:27 PM
Tony A
Francis,

I agree that if it's hidden why is it there? However, I have had occasion to build two separate chains driven from one main selection, the only way I could get it to function staying within IB JavaScript code is to allow the first chain to propogate and then change the index value of the first item within the second chain to the same value as the first combo in the first chain (still with me?). As you get into all sorts of mess trying to force the chain arrays to be driven from one main combo, the only way out is to mimic the combo and change in parallel.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
December 01, 2009, 04:36 PM
Francis Mariani
Lovely Jubbly.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 02, 2009, 05:36 AM
It's Alive!
include style="Z-INDEX: 19; LEFT: 1250px; VISIBILITY: hidden; POSITION: absolute; TOP: 106px" in the dropdown's styling .. this works for me.... the dropdown's value can be set using conventional javascript onclick functions :-) peace !

This message has been edited. Last edited by: It's Alive!,


WebFOCUS 7.1.4
UNIX
HTML,PDF,EXL2K
December 02, 2009, 10:25 AM
Francis Mariani
Ah, yes - but now you're coding. I tried to make the drop-down box hidden using the GUI and that didn't work.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server