I have a drop-down box with various options. The question is how do I direct the user to the desired page when they select a particular option. I have copied some of the code below but it doesn't work. Any help please.
SCRIPT LANGUAGE="JavaScript">
<!-- JavaScript begins...
function jump (page) {
//alert(page);
window.location = page;
}
// JavaScript ends -->
</SCRIPT>
In body section:
<form action="search.cfm" name="skip">
<SELECT NAME="page" onChange = "jump (document.skip.page.options[page.selectedIndex].value)">
<cfoutput query="get_style">
<option value="tour1.cfm">#get_style.style_name#</option>
</cfoutput>
</select>
</form>
SCRIPT LANGUAGE="JavaScript">
<!-- JavaScript begins...
function jump (page) {
//alert(page);
window.location = page;
}
// JavaScript ends -->
</SCRIPT>
In body section:
<form action="search.cfm" name="skip">
<SELECT NAME="page" onChange = "jump (document.skip.page.options[page.selectedIndex].value)">
<cfoutput query="get_style">
<option value="tour1.cfm">#get_style.style_name#</option>
</cfoutput>
</select>
</form>