I have an application where I gather URLs and descriptive text from a table and I want to populate an option box. The problem is that I cannot figure out the syntax.
<SCRIPT LANGUAGE="JavaScript">
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
</SCRIPT>
<form name="form">
<FONT COLOR="#000000" SIZE="3">
<select name="site" size=1 onChange="javascript:formHandler()">
<option value="">Class Stuff:....
<%FOR 1 = 1 TO lnRecs%>
<option value="<%RTRIM(iURL)%>"><%RTRIM(iText)%>
</select>
</FONT>
</form>
In this example I need to get the syntax right and have the click sent to the formhandler(). Although I can do without the formhandler() and put a button, I need to know what the button needs to know to fetch the page. In either event, can someone help with the <option> syntax and page fetching please?
Joe