classic asp - javascript array populated by vbscript drop down list

Mr-Moo

New Member
I need to create a javascript array which is populated based on drop down lists' (more than one) selected values, except each drop down list has the same name because they are created in a for loop. Right now I have:\[code\]<script language="JavaScript"> var array = []; var e = document.getElementById("phItemStatusID").value; //returns first ddl value</script>\[/code\]and later in the asp code is my drop down list which is populated from a database using VBScript:\[code\]<%for i = 0 to UBound(photoItemsArray,2)%> //for each item, generate DDL<select name="phItemStatusID"> itemStatusID = photoItemsArray(6,i) //get current selected value for j = 0 to UBound(photoStatusesArray,2)%> //for each possible status <option value="http://stackoverflow.com/questions/11672855/<%=photoStatusesArray(0,j)%>" <%if photoStatusesArray(0,j) = itemStatusID then%> selected <%end if%>> <%=photoStatusesArray(1,j)%> </option> <%next%></select>next%>\[/code\]This works in situations where there is only one dropdown list generated. The problem I'm running into involves instances where there is more than one drop down list with the name "phItemStatusID". var e = document.getElementById("phItemStatusID").value; only returns the first drop down list's values and the others are ignored. How do I obtain them?Thanks!
 
Back
Top