Focal Point
Activating a list box in the HTML Painter - WF 717 Windows XP Operating System

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

November 01, 2010, 09:46 AM
Michele
Activating a list box in the HTML Painter - WF 717 Windows XP Operating System
I am working on a WebFocus launch page that was setup in the HTML Painter, but was coded using html/java script for all of the buttons on the launch page. I have added a single select listbox that will have only two values, either a 'Y' or an 'N. Pasted below is the code that I have put in the HTML Painter thus far.

<SELECT id=lstnatl style="Z-INDEX: 5; LEFT: 130px; WIDTH: 50px; POSITION: absolute; TOP: 250px; HEIGHT: 40px" tabIndex=18 size=3 name=National> 
<OPTION value=N displaytext="N">N
</OPTION> 
<OPTION value=1 displaytext="Y">Y
</OPTION>
</SELECT> 

When I run the code, the listbox is not being recognized; therefore it appears that I have to insert additional html code. I think that I need to add html code similar to the code pasted below that is already in the html program. The first pasted code is for a radio button. The second pasted code is for a list box. I don't completely understand the pasted code, so I need to know exactly how to add the additional code needed for the listbox button I created called "1stnatl." I want the code that I add to be as simple as possible. Thanks.

This code is for a radio button.
< !--Market Segment filter check-->
var mktval = document.hmirform.mkt.value;
if (document.hmirform.mkt.value=='Enter Mkt Segment Code' || document.hmirform.mkt.value=='')
	{
	document.hmirform.mkt.value = '';
	}
	else
	{
	var mlen = document.hmirform.mkt.value.length;
	goahead = goahead + 1;
//alert("mlen = " + mlen);
	if (mlen > 2){
		alert("Marketing Market Segment Codes are no more than 2 characters in length.  Please re-enter.");
		goahead = 0;
		}
	}
//end mkt val check

This code is for a muti-select list box
< !--LOBs selected-->
var p=0;
var i=0;
var strLOB = "";
for(var i=0; i<document.hmirform.lstLOB.options.length; i++){
		if (document.hmirform.lstLOB.options[i].selected)
			{
			if (strLOB.length == 0) {strLOB = document.hmirform.lstLOB.options[i].value}
				else
				{strLOB = strLOB + '#' + document.hmirform.lstLOB.options[i].value}
			p=p+1;
			goahead = goahead + 1;
		}
	}
document.hmirform.lobs.value = strLOB;

This message has been edited. Last edited by: Michele,
November 01, 2010, 10:08 AM
Francis Mariani
Please edit your original post, correcting where/how you put your code tags:

[code]
your code goes here
[/code]



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 01, 2010, 02:37 PM
Tony A
quote:
a WebFocus launch page that was setup in the HTML Painter

Be vary wary of trying to edit the HTML generated within the painter as there are a few components that have to be co-ordinated with the XML towards the bottom of the code.

Click on the parameters tab and ensure that all the components / variables are bound as necessary.

To be in a position to edit the code generated within the painter you do need a very good understanding of how the components are linked etc. by the GUI.

My advice? Do one or the other, unless you know what all component pieces are required and how to connect them manually.

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