Hi, i'm trying to pass a variable using JS, but for some reason my script isn't working, any suggiestions??
I have not failed; I merely found 100,000 different ways of not succeding...
Code:
<HTML>
<HEAD>
<script>
function passing(tst) {
var tst = document.FRM123.subject.value;
if(document.FRM123.recipient.options[0].selected == true) {
tst = "Hi mate";
}
if(document.FRM123.recipient.options[1].selected == true) {
tst = "Hi mate, whas new??";
}
if(document.FRM123.recipient.options[2].selected == true) {
tst = "Hi mate, howdy...";
}
}
</script>
</HEAD>
<BODY>
<form action="" method="POST" enablecab="Yes" name="FRM123" onSubmit="return passing(this.value)">
<select name="recipient">
<option value="mailto:emailone@aol.com">Him</option>
<option value="mailto:emailtwo@hotmail.com">Her</option>
<option value="mailto:emailthree@yahoo.com">They</option>
</select>
<input type="hidden" name="subject" value="tst">
<input type="button" name="submit" value="submit">
</form>
</BODY>
</HTML>