Hello List!
I’m new to JavaScript and am having a little problem w/ getting my select box populated…
I’m passing in a ‘LocationID’ to this page and need to write a function to take that LocationID and populate the select box when the page is loaded.
Here’s my onload:
[CODE]<body topmargin=”0″ leftmargin=”0″ onunload=”javascript:closeWindows();” onload=”loadTopSVGVariables(document.forms[0].LocationID);loadBottomLocationID(document.forms[0].LocationID);”>
And the function I’m trying to get working:
[CODE]function loadBottomLocationID(LocationID){
if ( LocationID != null ){
document.forms[0].LocationID = new Option(LocationID);
}
}
And, lastly, my code for my select box:
[code=html]<tr>
<td ID=”MultipleSearch”>
<select name=”LocationID” multiple=”true” size=”25″ Width=”200″>
[CODE]<%
if IsArray(arrLocs) then
bSelectOptions = true
for i = 0 to UBound(arrLocs, 2)
Response.Write “<option value=””” & arrLocs(0,i) & “””>” & arrLocs(1,i) & “</option>”
next
end if
%>
[code=html]
</select>
</td>
</tr>
So, what I want is to get the LocationID that is being passed in, and populate this value in the select box on the page…
Any help or assistance you could provide would be greatly appreciated!
Thanks in advance for your time and help!
-jiggy_g