...

View Full Version : script for <select> value



gilgalbiblewhee
05-03-2006, 01:35 AM
How do I make the selection go to the assigned value?

<select onchange="go();">
<option value="/wheelofgod/tableformat.asp?page=1&sort=&keyword=jesus&text_data=yes&optAction=on">1</option>
<option value="/wheelofgod/tableformat.asp?page=2&sort=&keyword=jesus&text_data=yes&optAction=on">2</option>
<option value="/wheelofgod/tableformat.asp?page=3&sort=&keyword=jesus&text_data=yes&optAction=on">3</option>
<option value="/wheelofgod/tableformat.asp?page=4&sort=&keyword=jesus&text_data=yes&optAction=on">4</option>
<option </select>

_Aerospace_Eng_
05-03-2006, 08:27 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function goTo(where)
{
window.location = where;
return false;
}
</script>
</head>

<body>
<form action="#" method="post" onSubmit="return goTo(this.menu.options[this.menu.options.selectedIndex].value)">
<select name="menu" onChange="go(this.options[this.options.selectedIndex].value);">
<option value="/wheelofgod/tableformat.asp?page=1&sort=&keyword=jesus&text_data=yes&optAction=on">1</option>
<option value="/wheelofgod/tableformat.asp?page=2&sort=&keyword=jesus&text_data=yes&optAction=on">2</option>
<option value="/wheelofgod/tableformat.asp?page=3&sort=&keyword=jesus&text_data=yes&optAction=on">3</option>
<option value="/wheelofgod/tableformat.asp?page=4&sort=&keyword=jesus&text_data=yes&optAction=on">4</option>
</select>
<input type="submit" value="Go">
</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum