Focal Point
[closed] Dropdown chaining HTMLFORM

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

February 03, 2015, 05:22 PM
Enigma006
[closed] Dropdown chaining HTMLFORM
Hello

Below is sample code with CAR file. I am trying to chain the 3 drop downs in here.
I know its easy with Composer, but I want it here as I have more functionality working here.
TABLE FILE CAR
SUM     
COMPUTE CNTR1/A200 = '<option value="' | COUNTRY | '">' | COUNTRY | '</option>';
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS CNTR_DD
END

TABLE FILE CAR
SUM     
COMPUTE CR1/A200 = '<option value="' | CAR | '">' | CAR | '</option>';
BY CAR
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS CAR_DD
END

TABLE FILE CAR
SUM     
COMPUTE MDL1/A200 = '<option value="' | MODEL | '">' | MODEL | '</option>';
BY MODEL
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS MDL_DD
END


-HTMLFORM BEGIN
<HTML>
<head>
</HEAD>
<body>
<TABLE>
<TR>
<TD><b>Country:</TD>
<TD><b><SELECT name="CNTRY"> !IBI.FIL.CNTR_DD; </SELECT></TD>
</TR>
<TR>
<TD><b>Car:</TD>
<TD><b><SELECT name="CR">   !IBI.FIL.CAR_DD; </SELECT></TD>
</TR>
<TR>
<TD><b>Model:</TD>
<TD><b><SELECT name="MDL">  !IBI.FIL.MDL_DD; </SELECT></TD>
</TR>
</TABLE>
</body>
</html>
-HTMLFORM END


Please let me know the options.

Thank you.

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


8.1.05
HTML,PDF,EXL2K, Active, All
February 04, 2015, 08:59 AM
Wep5622
With that approach, the only way to get chaining to work is to implement the javascript to handle that yourself. That's not a task for the feint of heart; been there, done that.

For example, IBI's implementation makes use of a rather extensive "xml-island" to describe all the form elements and their chaining.
Your HTML is missing those bits, so you can't use IBI's implementation with what you have now.

The best advice you will get is to use Composer, so that you can use IBI's implementation.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
February 05, 2015, 07:31 AM
eric.woerle
WEP is right, unless you have a specific reason why you have to bypass WFs standard chaining, I would use the composer. You can always create it in the composer and either copy and paste it in, or use a -htmlform and include it in your fex.

If you still feel that you have some special reason to go outside of the box, you can use jquery to populate your dropdown. Essentially you will need to create a fex for your dropdowns. You will want to create defines to create your options. You will need to capture the values of your dropdowns in js and pass them through the URL when you issue your jquery.get statement.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
February 06, 2015, 12:54 AM
Ram Prasad E
You can search this forum for keyword AJAX to list more discussions on this topic.

Thanks,
Ram


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