I assume you're trying to run the function loadajaxpage() inside a SELECT drop down menu? What you have won't work since the JavaScript syntax is incorrect. For example, onChange can't be added inside the OPTION element, it has no effect. Here's an example that should work:
Code:
<form id="aform">
<select id="mymenu" size="1">
<option value="nothing">Select a page</option>
<option value="canada.htm">Canada</option>
<option value="china.htm">China</option>
<option value="usa.htm">USA</option>
</select>
</form>
<script type="text/javascript">
var selectmenu=document.getElementById("mymenu")
selectmenu.onchange=function(){ //run some code when "onchange" event fires
var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
if (chosenoption.value!="nothing"){
countries.loadajaxpage(chosenoption.value)
}
}
</script>
You may want to read up on how to manipulate SELECT menus in JavaScript.
Bookmarks