help copying list in form to variable

liunx

Guest
hi everyone,<br />
<br />
I seem to be having a small problem in my html form. When i try to simply get the contents of my list and put it in an array using javascript, each element of the list is empty... <br />
<br />
so i looked at the contents of each item in the list...and it said it showed each item to be empty ..even though i can visually see stuff in the list..(btw i did this by using alerts(document.uRemove.uploader.options.value); (uRemove is the form name, uploader is the list name) and<br />
( being any element in the list).<br />
<br />
So currently ive got no idea what the problem is...maybe im not writing the correct code to acess each list item<br />
ie. im writing document.formName.listName.options.value<br />
is that right? I also attached my code if that helps<br />
<br />
ill appreciate any help...thanks in advance<!--content-->The new Option needs a text item and a value item <br />
<br />
example:<br />
<br />
<br />
<br />
Ulist.options[newItem] = new Option(currentfile,"blah");<br />
<br />
<br />
<br />
where currentFile is the text to be displayed and blah is the value. For your purposes, you would want to do this:<br />
<br />
<br />
Ulist.options[newItem] = new Option(currentfile,currentfile);<!--content-->
 
Back
Top