Forum Moderators: open
Here is the code
<SCRIPT LANGUAGE="JavaScript">
<!--
function formHandler(form){
if(form.site.options[form.site.selectedIndex].value!= "")
window.location.href = form.site.options[form.site.selectedIndex].value;
}
// -->
</SCRIPT>
And then one of the pull down items look like this
<form onSubmit="formHandler(this); return false">
<select name="site" size="1">
<option value="">Select Size to order
<option value="http://www.domainname.com"> 1 oz. $12.95
</select>
<input type="submit" value="Go!">
</form>
Any way to get this to open to a new window?
Steve
You should change: <SCRIPT LANGUAGE="JavaScript">
to the newer: <script type="text/javascript">
And remove the comments: <!-- and // -->
They once were useful in hiding JS from early browsers who did not support it, but those days have come and gone.
function formHandler(form){
newurl=form.site.options[form.site.selectedIndex].value;
if (newurl!= "")
{window.open(newurl,'new','<!--add features string here as needed-->') }
}