freaksarise
05-08-2003, 11:17 PM
Hello everyone. I have pulldown (list form element). OnChange I am having it run this function. Based upon the option selected or VALUE I am having do one of 2 things.
The code below works perfect. However when I remove the comments the multiple statements for the first condition do not react as I would predict. It appears to treat the alert as a straight command and not as a result of the condition. How do I make multiple actions occur off of one condition. See code below:
THIS WORKS:
function rw_test() {
if (document.form2.rwpulldown.value=="x.htm")
MM_openBrWindow('x.htm','','width=250,height=200');
//alert("x yes");
//var targetrw = "blank";
if (document.form2.rwpulldown.value=="y.htm")
alert("y yes");
}
THIS DOES NOT WORK (note I am trying to have all 3 statements occur from the first IF only)
function rw_test() {
if (document.form2.rwpulldown.value=="x.htm")
MM_openBrWindow('x.htm','','width=250,height=200');
alert("x yes");
var targetrw = "blank";
if (document.form2.rwpulldown.value=="y.htm")
alert("y yes");
}
Thank you all so much for your help!
FA
The code below works perfect. However when I remove the comments the multiple statements for the first condition do not react as I would predict. It appears to treat the alert as a straight command and not as a result of the condition. How do I make multiple actions occur off of one condition. See code below:
THIS WORKS:
function rw_test() {
if (document.form2.rwpulldown.value=="x.htm")
MM_openBrWindow('x.htm','','width=250,height=200');
//alert("x yes");
//var targetrw = "blank";
if (document.form2.rwpulldown.value=="y.htm")
alert("y yes");
}
THIS DOES NOT WORK (note I am trying to have all 3 statements occur from the first IF only)
function rw_test() {
if (document.form2.rwpulldown.value=="x.htm")
MM_openBrWindow('x.htm','','width=250,height=200');
alert("x yes");
var targetrw = "blank";
if (document.form2.rwpulldown.value=="y.htm")
alert("y yes");
}
Thank you all so much for your help!
FA