hi.
if have this asp page that displays 8 lines of values in a form with a pull-down menu. it's done by a loop and the pull-down menus on the source end up having the same name.
here's the code:
when i try to display the value of itmcod, i'm getting an error.
Error: 'Form1.itmcod.options' is null or not an object
the javascript code looks like this:
however, if i take this pull-down menu out of the loop and put it as single item, it works.
any ideas?
thanks.
if have this asp page that displays 8 lines of values in a form with a pull-down menu. it's done by a loop and the pull-down menus on the source end up having the same name.
here's the code:
Code:
<form name="Form1" method="post">
<% for i = 1 to 8 %>
<INPUT type="text" NAME="itmnbr" size=20>
<INPUT type="text" NAME="itmdesc" size=50>
<INPUT type="text" NAME="itmprice" size=20>
<SELECT name="itmcod" SIZE="1">
<OPTION value="Select Code">Select Code</option>
<OPTION value="111">111</option>
<OPTION value="222">222</option>
<OPTION value="333">333</option>
</SELECT>
<br />
<% next %>
</form>
Error: 'Form1.itmcod.options' is null or not an object
the javascript code looks like this:
Code:
var item_code = Form1.itmcod.options[Form1.itmcod.selectedIndex].text;
alert (item_code);
any ideas?
thanks.