I have a fairly huge intranet project on the make, nearing completion of one of the sub-projects.
However, I have this tiny little problem which I have shuffled forward and forward until it's the last problem I'm facing.
I'm trying to receive the selected item in a <SELECT> listbox.. however, failing, undefined listbox...
Here comes the information:
Code:
<P><FONT style="font-family:'Arial';font-size:6pt;">
<SELECT style="font-family:'Arial';font-size:7pt;" id=SizeList1 name=SizeList1>
<OPTION Value="Alkup.">ALKU P.</OPTION>
<OPTION Value="A0">A0</OPTION>
<OPTION Value="A1">A1</OPTION>
<OPTION Value="A2">A2</OPTION>
<OPTION Value="A3">A3</OPTION>
<OPTION Value="A4">A4</OPTION>
</Select>
</FONT></P></TD></TR>
The HTML code for the select box looks like that.. I have about 348 of them on my page. (including a whole lot of other data)
This HTML page is not loaded directly, I load it into a DIV using innerHTML, thus it is not accessible directly using Javascript,
I have to use: document.all["SizeList1"].value for example.
Code:
curSizeString='\'SizeList'+ i +'\'';
alert('sizelist='+document.all["SizeList1"]);
alert('curSizeString='+curSizeString+', document.all[curSizeString]='+document.all[curSizeString]);
(the code window removed some escape characters, the code format for assing the variable the value is correct in reality)
These code rows, should return object, however they return undefined. I use the same document.all[object] on all the other items in my pages, does anyone have any idea why this isn't working for the <select> box?
I can't see what could be causing the problem...
Thanks in advance,
Hena