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.
Greeting: Any suggestions on the following ?? I would like to create a html page where there is a drop down select box that contains states. Once the user selects one or more states I want another drop down select box to appear that contains the counties associated to the state(s) selected. I can hard code the states but I need to retrieve the counties from our Oracle database. Once the state(s) and counties are select I will run a focexec.
Posts: 69 | Location: OH | Registered: November 09, 2004
javascript arrays. if you go to the javascriptkit.com , you can find whats called "Combo Boxes" and there is the code for setting up javascript arrays, where a selection in the first box loads the corresponding array set for the second selection.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
has nothing to do with it. write your javascript array 1 time, and dont look it up live from some oracle table ever again, unless you do it in batch every once in a while. You specify that you have an HTML page..that means Javascript is available to you to use. If you were to have an .ASP page, your options may be a bit wider, as you can use different scripting languages. But your question is about the functioning of whats called javascript arrays.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
This gets a bit combersome but in case you actually DO want to look in your database for values you can do it this way...
It looks like a lot of code but once you step through it, it's not all that bad.
structure of LURPT.LUC_STATE_NAMES_TABLE
select * from lurpt.luc_state_names_tbl where country = 'USA' and rownum < 3;
RETURNS --------+-------+--------+ COUNTRY | STATE | DESCR | --------+-------+--------+ USA........AK........Alaska USA........AL........Alabama
(Periods above are used for spacing only)
-* THIS CODE ASSUMES YOU HAVE A TABLE NAMED LUC_STATE_NAMES_TBL -* UNDER THE SCHEMANAME OF 'LURPT' WHICH HAS ONE LISTING PER STATE -* NOTE THAT YOU ALSO MUST HAVE A DATA ADAPTER WITH THE NAME 'RPTPRD' -* THIS IS ALSO THE TNSNAMES SID
-* THIS PORTION PULLS DATA OUT OF YOUR ORACLE DATABASE
SQL SQLORA SET SERVER RPTPRD SQL SQLORA SELECT STATE, DESCR FROM LURPT.LUC_STATE_NAMES_TBL t WHERE T.COUNTRY = 'USA' AND T.NUMERIC_CD > '0'; TABLE ON TABLE HOLD AS HOLDST FORMAT FOCUS INDEX STATE END -* THIS PORTION CREATES YOUR DYNAMIC DROPDOWN
TABLE FILE HOLDST PRINT COMPUTE OPTIONS_VAL/A99 = '<OPTION VALUE="' | STATE | '">' | DESCR | '</OPTION>'; BY STATE NOPRINT ON TABLE HOLD AS STATES FORMAT ALPHA END
-* THIS SECTION CREATES YOUR HTML FILE AND USES THE DROPDOWNS -HTMLFORM BEGIN <html> <body> <FORM NAME="FORM1" action='/ibi_apps/WFServlet' method='post' onSubmit="return checkInput()"> <INPUT NAME="IBIF_ex" VALUE="myfex" TYPE="hidden"> <DIV><H3 ALIGN="CENTER">CHOOSING FROM DYNAMIC DROPDOWN: AN EXAMPLE</H3></DIV> <table><tr><td> <B>STATE: </B> <SELECT NAME="STATE" SIZE="1"> !IBI.FIL.STATES; </SELECT> </td> </tr> </table> <!-- FOR DOMAIN RIGHT-CLICK ON THE DOMAIN AND LOOK AT PROPERTIES --> <input type='hidden' name='IBIMR_domain' value="cicd8c8r/cicd8c8r.htm"> <input type='hidden' name='IBIMR_action' value="MR_RUN_FEX"> <input type='hidden' name='IBIMR_sub_action' value="MR_STD_REPORT"> <!-- FOR THIS VALUE RIGHT-CLICK THE .FEX YOU WANT TO RUN AND LOOK AT PROPERTIES --> <input type='hidden' name='IBIMR_fex' value="app/myfex.fex"> <!-- THIS IS THE SAME AS THE LINE ABOVE IT... --> <input type='hidden' name='IBIF_ex' value="app/myfex.fex"> <input type='hidden' name='IBIMR_flags' value=""> <!-- FOR THIS VALUE RIGHT-CLICK THE FOLDER AND LOOK AT PROPERTIES --> <input type='hidden' name='IBIMR_folder' value="#newfolderv3l"> <input type='hidden' name='IBIMR_random' value=''> <INPUT NAME="submit" TYPE=SUBMIT VALUE="Run Report"> <INPUT NAME="reset" TYPE=RESET VALUE="Clear Form"> </P> </FORM> </body> </html> -HTMLFORM END
-* CODE FOR MYFEX.FEX
-* NOTE THAT "STATE" IS THE 'NAME' OF THE OPTION AND THUS THE AMPER VARIABLE
-HTMLFORM BEGIN <HTML> <BODY> STATE ABBR: &STATE </BODY> </HTML> -HTMLFORM END you'll have to do a find and replace on ampersand LT for the less than sign and the same for ampersand GT which is the greater than sign... silly HTML and BBSs
This gives code to: - Pull info out of an Oracle table via SQL passthrough - Save SQL Passthrough data into a hold file - Format an alpha hold file for output in html - Generate dynamic dropdowns or select boxes - Generate HTML code in a .fex file - Launch a report with MRE security from a web page
Keep the following things in mind: - Hold file names must be 8 characters or less - !IBI.FIL.HOLDNAME must be on a line by itself and left justified - Information you grab from properties must be exact (foldername, domain, fex name etc)
I used country to state but this can be easily expanded for state to county assuming that table is already built and in Oracle.This message has been edited. Last edited by: <Mabel>,
Posts: 77 | Location: Chicago, IL | Registered: May 06, 2004
-* File dropdown.fex -* Default CTRY is the same as the first list option on the form. -DEFAULTS &CTRY = 'ENGLAND'; -* This "report" creates the options list of cars for the -* choosen country: TABLE FILE CAR SUM COMPUTE OPTION/A128 = ''; AS '' BY CAR NOPRINT WHERE COUNTRY EQ '&CTRY' ON TABLE HOLD AS CAROPTS FORMAT ALPHA END -HTMLFORM BEGIN
<script type="text/javascript"> function loadPage() { var opts = document.dropdownForm.CTRY; for (var i=0; i < opts.length; i++) { if (opts[i].value == "!IBI.AMP.CTRY;") opts.selectedIndex = i; } }
< !-- The form which launches the focexec, which creates the --> < !-- list of cars when the country selection is changed. -->
< !-- Hard coded list of countries: -->
< !-- dynamicaly generated list of cars [depends on the selected country) -->
There is a "chaining" option in Dev Studio if you are using Dev Studio....
This option allows you to determine values in a second drop-down based upon the option selected in the first drop-down. Try a search in Focal Point, I know I've seen it here before.....
Posts: 132 | Location: Kansas | Registered: November 12, 2003