splash page with dropdown menu
I need some help for my site. I need a splash page with a drop down menu for people to choose w/c city they would like to go to.
I found a code that works because I tried it. my only problem is it's opening a new window. How can you edit this so it doesnt open a new window and just transfer them there?
<html>
<head>
<script type="text/javascript">
function redirectTo(val){
if(/^http/.test(val)){
window.open(val);
}
}
window.onload=function(){
document.getElementById('userChoice').onchange=fun ction(){
redirectTo(this.value);
}
}
</script>
</head>
<body>
<select id="userChoice">
<option value="">Choose your location .....</option>
<option value="http://newyorksite.com">New York</option>
<option value="http://londonsite.com">London</option>
<option value="http://vancouversite.com">Vancouver</option>
</select>
</body>
</html>
I really do appreciate your help guys! Thanks!
My Business site: WarMarks - Web Development | My Personal Blog: Mohsin Rasool
My Business site: WarMarks - Web Development | My Personal Blog: Mohsin Rasool
My Business site: WarMarks - Web Development | My Personal Blog: Mohsin Rasool