Focal Point
HTML Launch Page Problem

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

October 16, 2007, 12:32 PM
.eric
HTML Launch Page Problem
I am basically trying to use a dropdown with a text box that are chained together. The dropdown has a list of items while the text box is used to populate the item description. Both have the same data souce which provides the item number for the drop down and the item descriptoin for the text box.

Now my question is I added the "add all" option to the drop down but the text box for the item description still populates itself with the first item number description.

I tried to use javascript to fix this but it doesn't seem to work. I added an if statement to the onload() which checks the selectedIndex of the dropdown and to change the text box to "All Items" if it's 0. This works fine but I also tried putting this into a seperate function and adding it to the onchange of the textbox but it doesn't seem to be executing the javascript.

Does anyone know what I can be doing wrong of if there is another way to do this?

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
October 16, 2007, 12:51 PM
Tony A
Eric,

Is it that you just want to display the item description on the screen? or do you just want to be able to place it in a variable when your form is submitted?

Either way, you might find it easier to use a second dropdown populated in the same manner as your initial one. Chain them together and the description should change with the item selection. Set both of them to have the ALL option and they should sit together nicely.

If you want a textbox so that the end user can overwrite the description (why?) then you could hide the second combo and use javascript to place the value from the second combo into the textbox using the onchange event - be careful when using IBIRLS2.js for this as one of the first things it does is to drop any onchange event(s) for combo boxes!! This is probably the real problem that you mention in your last paragraph. Solution? reassign the onchange event yourself in javascript.

Good luck.

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 
October 16, 2007, 12:54 PM
Tony A
... forgot to mention ...

You could change the reference to ibirls2.js to ibirls.js in the script section of your launch page.

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 
October 16, 2007, 02:03 PM
GinnyJakes
FYI, Tony.

The ibirls2.js problem is fixed in HotFix 3 for release 7.6.2. I no longer have to revert to using the old ibirls.js file.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
October 16, 2007, 03:06 PM
Tony A
HOORAY!!!! for that Smiler

Thanks for sharing that info Ginny

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 
October 16, 2007, 03:15 PM
.eric
Thanks for the reply. The problem with changing it to a dropdown and adding the all option is that after I select an item number the item description drop down will have 2 entries, all items and the item description for the selected item.

I don't need the description to be submitted, it's merely for visual purposes, as why I'd rather use a text box instead of a listbox or dropdown.

I tried changing it to reference IBIRLS and it is now giving me an error saying: "Unexpected call to method or property access."

There are actually 8 chained boxes on this form, 5 dropdown and 3 text boxes and it looks to be stopping on the first text box chain it finds...


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
October 16, 2007, 04:31 PM
Tony A
Eric,

If you only need the description for display purposes then set the display within your combo box to the item concatenated with the description, you can stilll leave the value passed as the variable as the item itself.

TABLE FILE yourtable
SUM COMPUTE ITM_DESC/A30 = item || (' '|item_description);
BY item
ON TABLE PCHOLD FORMAT XML
END

Should do it for a procedure based combo box.

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 
October 16, 2007, 04:58 PM
.eric
Great idea, that will work fine.

Thanks for the help Tony.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
October 16, 2007, 05:53 PM
Tony A
Glad to be of assistance Smiler

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