Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using Combo Box
 Login/Join
 
Silver Member
posted
I need to create an html output, it should have a combo-box populated with 20 items (should link to 20 reports that I have created in MRE).
Upon output I should be able to choose one of the values in combo-box and it should display the relevant report output on the same page in a frame.

I created an html page and tried usnig it through 20 hyperlink texts, it worked very well. But I need to do it using combo-box.

Javascript would be the only option or can I use Web-focus code?
Or any other approach would be better?

Thanks.
 
Posts: 34 | Registered: June 19, 2007Report This Post
Expert
posted Hide Post
Are you expecting to use the DevStudio GUI tool to build your HTML?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Yes, right now building it through DevStudio.
 
Posts: 34 | Registered: June 19, 2007Report This Post
Expert
posted Hide Post
Example NOT using the GUI:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Demo Launch WebFOCUS program</title>

<script type="text/javascript">
function LaunchFex()
{
if (document.forms[0].IBIF_focexec.selectedIndex != 0)
  {
  document.forms[0].submit();
  }
}
</script>
</head>

<body>

<form method="post" action="/ibi_apps/WFServlet?" target="ifFEX">

<select name="IBIF_focexec" onChange="LaunchFex();">
<option value="">Select a program...</option>
<option value="BID1">Program 1</option>
<option value="BID2">Program 2</option>
<option value="BID3">Program 3</option>
</select>
</form>

<iframe NAME="ifFEX" frameBORDER="1" scrolling="auto" HEIGHT="400" WIDTH="600"></iframe>
</body>
</html>


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Thanks for responding Francis,

I need a bit explanation on the function:

function LaunchFex()
{
if (document.forms[0].IBIF_focexec.selectedIndex != 0)
{
document.forms[0].submit();
}
}

"document.forms[0].IBIF_focexec.selectedIndex "
how would I relate this to my components.

Thanks.
 
Posts: 34 | Registered: June 19, 2007Report This Post
Expert
posted Hide Post
The code I posted is a working example (except for the programs actually being executed, BID1, BID2 etc).

IBIF_focexec is the form object required by the form action and contains the name of the fex that must be executed upon form submit.

The JS code
if (document.forms[0].IBIF_focexec.selectedIndex != 0)
verifies that a program was selected, != 0 means not equal to 0 which is the first value in the select box - the comment "Select a program..."

The JS code
document.forms[0].submit();
submits the form.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis

I applaud your using a DOCTYPE declaration in your code and wish everyone would use it, but the one you are using will cause all browsers to operate in quirks mode, not standards/almost standards mode. This could effect layouts. Can I recommend the use of:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
(probably the safest)
or
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
(defaults to STRICT)
or
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
(defaults to STRICT)

for general WebFOCUS work.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Silver Member
posted Hide Post
Francis,

For BID1, BID2 etc. I'll be giving the names of my procedures?

"IBIF_focexec is the form object required by the form action and contains the name of the fex that must be executed upon form submit. "
Here also, I need to rename it with my procedure names? Kind of not clear on that.

Also, where would I give the path for procedures like: app/procedure1.fex

Thanks.
 
Posts: 34 | Registered: June 19, 2007Report This Post
Expert
posted Hide Post
MRE Version:
<HTML>
<HEAD>
<title>Demo Launch WebFOCUS program</title>

<script type="text/javascript">
function LaunchFex()
{
if (document.forms[0].WF_PROCEDURE.selectedIndex != 0)
  {
  document.forms[0].IBIMR_fex.value = 'app/' + document.forms[0].WF_PROCEDURE[document.forms[0].WF_PROCEDURE.selectedIndex].value + '.fex';
  document.forms[0].IBIF_ex.value   = 'app/' + document.forms[0].WF_PROCEDURE[document.forms[0].WF_PROCEDURE.selectedIndex].value + '.fex';
  document.forms[0].submit();
  }
}
</script>
</HEAD>

<BODY>
<FORM action='/ibi_apps/WFServlet' method='post' target="ifFEX">
<input type='hidden' name='IBIMR_domain' value="francism/francism.htm">
<input type='hidden' name='IBIMR_action' value="MR_RUN_FEX">
<input type='hidden' name='IBIMR_sub_action' value="MR_STD_REPORT">
<input type='hidden' name='IBIMR_fex' value="">
<input type='hidden' name='IBIF_ex' value="">
<input type='hidden' name='IBIMR_flags' value="">
<input type='hidden' name='IBIMR_folder' value="#testyrsaxhlg">
<input type='hidden' name='IBIMR_random' value=''>
<script>document.forms[0].IBIMR_random.value = Math.random();</script>

<select name="WF_PROCEDURE" onChange="LaunchFex();">
<option value="">Select a program...</option>
<option value="bid1">Program 1</option>
<option value="bid2">Program 2</option>
<option value="bid3">Program 3</option>
</select>

</FORM>

</BODY>
</HTML>

This message has been edited. Last edited by: Francis Mariani,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I just edited my reply by giving an MRE version. Others may find better ways.

Alan, the DOCTYPE was generated by my text-editor and was of no concern to me for the purpose of this demo program. Thank you for your lesson.

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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders