|
-
Aug 31st, 2001, 12:15 AM
#1
Thread Starter
Junior Member
onChange in a listbox
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage) {
url = "pizza.php?request=popup&id=" + mypage
var winl = (screen.width - 220) / 2;
var wint = (screen.height - 420) / 2;
winprops = 'height=220, width=420, top='+wint+, left='+winl+', scrollbars=yes'
win = window.open(url, "Pizza Parissa", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>
...
<form name="form1">
<select size="1" name="jumpList" onChange="NewWindow(me.selectedIndex)">
<option>Choose a Search Engine</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.av.com">AltaVista</option>
<option value="http://www.google.com">Google</option>
</select>
</form>
I want this code to display a listbox, and when an item is selected, changed, it opens a new window. It never gets as far as opening the window. Any ideas why this is not happening? Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|