Forum Moderators: open
How do I get it to open in a new window?
The script is:
<!-- Hide script from older browsers
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
if (newPage != "") {
window.location.href = newPage
}
}
// End hiding script from older browsers -->
And it is activated in a form as follows :
<form action="gotoLocation.cgi" method="GET" target="_blank">
<select name="newLocation" onChange="jumpPage(this.form.newLocation)" class="smalltext">
<option value="" selected>Option 1 etc
Any assistance much appreciated.
Now, what I would do is change the
window.location.href = newPage for a window.open(url,name,attributes), or something very similar to that :) window.location.href = newPage window.open(newPage,'newWindow'); Want to learn more JavaScript? I suggest you visit [javascriptsource.com ], they have lots and lots of JavaScripts for many different things, you can use and/or study the code.
Maybe the JavaScript reference guide would be useful too. I can't remember where did I downloaded it from, but if you like it I can send it to you by email, but notice, it is a 6.4 MB PDF file!
Let me know.
Cheers