gemynd
06-07-2003, 12:35 AM
I am trying to use multiple combo boxes to form a string of words describing something and then place that text string into a textbox. I have the following script...
function SubmitOrder(form) {
ExchangeForm.OrderQueue.value = ExchangeForm.OrderQueue.value+"Result: "+ExchangeForm.UnitOut.Value+ExchangeForm.UnitIn.Value+ExchangeForm.Quantity.Value+";";
Window.Close
}
...and the following form...
<FORM name=ExchangeForm>
<TABLE border="1" width="100%">
<TR>
<TD width="33%"><FONT size="1" face="Arial">Initial Units</FONT></TD>
<TD width="33%"><FONT size="1" face="Arial">Secondary Units</FONT></TD>
<TD width="34%"><FONT size="1" face="Arial">Quantity</FONT></TD>
</TR>
<TR>
<TD width="33%"><SELECT size="1" name=UnitOut style="font-size: 10px; background: black; color: white;">
<OPTION value="a" selected>Alpha</OPTION>
<OPTION value="b">Bravo</OPTION>
<OPTION value="c">Charlie</OPTION>
</SELECT></TD>
<TD width="33%"><SELECT size="1" name=UnitIn style="font-size: 10px; background: black; color: white;">
<OPTION value="a" selected>Alpha</OPTION>
<OPTION value="b">Bravo</OPTION>
<OPTION value="c">Charlie</OPTION>
</SELECT></TD>
<TD width="34%"><SELECT size="1" name=Quantity style="font-size: 10px; background: black; color: white;">
<OPTION selected>1</OPTION>
<OPTION>2</OPTION>
<OPTION>3</OPTION>
</SELECT></TD>
</TR>
</TABLE>
<P align="center"><INPUT type="button" value="Exchange" name=Exchange onclick="javascript:SubmitOrder(this.form)" style="font-size: 10px; background: black; color: white;">
</P>
</FORM>
...however, whenever I click the Exchange button, I get the following...
"Result: undefinedundefinedundefined"
...in the textbox. What does it mean when it states "Undefined"?
-Brian
function SubmitOrder(form) {
ExchangeForm.OrderQueue.value = ExchangeForm.OrderQueue.value+"Result: "+ExchangeForm.UnitOut.Value+ExchangeForm.UnitIn.Value+ExchangeForm.Quantity.Value+";";
Window.Close
}
...and the following form...
<FORM name=ExchangeForm>
<TABLE border="1" width="100%">
<TR>
<TD width="33%"><FONT size="1" face="Arial">Initial Units</FONT></TD>
<TD width="33%"><FONT size="1" face="Arial">Secondary Units</FONT></TD>
<TD width="34%"><FONT size="1" face="Arial">Quantity</FONT></TD>
</TR>
<TR>
<TD width="33%"><SELECT size="1" name=UnitOut style="font-size: 10px; background: black; color: white;">
<OPTION value="a" selected>Alpha</OPTION>
<OPTION value="b">Bravo</OPTION>
<OPTION value="c">Charlie</OPTION>
</SELECT></TD>
<TD width="33%"><SELECT size="1" name=UnitIn style="font-size: 10px; background: black; color: white;">
<OPTION value="a" selected>Alpha</OPTION>
<OPTION value="b">Bravo</OPTION>
<OPTION value="c">Charlie</OPTION>
</SELECT></TD>
<TD width="34%"><SELECT size="1" name=Quantity style="font-size: 10px; background: black; color: white;">
<OPTION selected>1</OPTION>
<OPTION>2</OPTION>
<OPTION>3</OPTION>
</SELECT></TD>
</TR>
</TABLE>
<P align="center"><INPUT type="button" value="Exchange" name=Exchange onclick="javascript:SubmitOrder(this.form)" style="font-size: 10px; background: black; color: white;">
</P>
</FORM>
...however, whenever I click the Exchange button, I get the following...
"Result: undefinedundefinedundefined"
...in the textbox. What does it mean when it states "Undefined"?
-Brian