I have this script working fine, in IE and NS, except that I wish to lose the button and have it 'go' when the selection is made..rather than when the user hits the button..
(( I have indcluded
as some forums use this to keep the format of the script. It is not part of the script and should be disregarded if it does not work here...))
(( I have indcluded
Code:
Code:
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">
<!--
function go_to_station(){
if (document.stationform.stationselect.options[0].selected){
window.location.href = "mailto:user@domain";}
else if (document.stationform.stationselect.options[1].selected)
{ window.location.href = "mailto:user@domain";}
else if (document.stationform.stationselect.options[2].selected)
{ window.location.href = "mailto:user@domain";}
else if (document.stationform.stationselect.options[3].selected)
{ window.location.href = "mailto:user@domain";}
else if (document.stationform.stationselect.options[4].selected)
{ window.location.href = "mailto:user@domain";}
return true;
}
function textValue(){
var stationInteger, stationString
stationInteger=document.stationform.stationselect.selectedIndex
stationString=document.stationform.stationselect.options[stationInteger].text
document.stationform.stationtext.value = "Go!"
}
//-->
</script>
</head>
<body>
<form name="stationform">
<select name="stationselect" onChange="textValue()" size="1">
<option>selection1
<option>selection2
<option>selection3
<option>selection4
<option>selection5
</select>
<p>
<input type="button" name="stationtext" value="" onClick="go_to_station()">
</form>
</body>
</html>