it would seem to make more sense to me to make it a select box (to avoid people misentering the code), but then maybe you want to keep the options "secret" (which they won't be with javascript/html, but anyway...). here are both approaches - you can see which you like:
Code:
<html>
<head>
<title></title>
<script type="text/javascript">
function reDirect(choice){
switch (choice){
case "303033":
window.open("http://www.google.com")
break;
case "102222":
window.open("http://www.yahoo.com")
break;
case "440000":
window.open("http://www.codingforums.com")
break;
}
}
</script>
</head>
<body>
<select onchange="reDirect(this.value)">
<option >select code</option>
<option value="303033">303033</option>
<option value="102222">102222</option>
<option value="440000">440000</option>
</select>
Input code: <input id="tb" type="text"/><input type="button" value="go to page" onclick="reDirect(document.getElementById('tb').value)"/>
</body>
</html>