Sweet and merciful Zeus I cannot figure out why this doesn't work!
Please put me out of my misery!
Here's the deal: I want the link to open in a new window *only* if the user selects the Recycling option in the pulldown menu. What am I missing?
function changeURL(param){
if (param="/recycling/index.html"){
window.open(param)
}
else{
window.location.href= param;
}
}
<!--
document.write("<select name=quicklink onChange='changeURL(options[selectedIndex].value)'>");
document.write("<option selected value='http://www.webdeveloper.com/index.html'> ------- Quick Link ------- ");
document.write("<option value='http://www.webdeveloper.com/index.html'>Home");
document.write("<option value='http://www.webdeveloper.com/business/index.html'>Business");
document.write("<option value='http://www.webdeveloper.com/recycling/index.html'>Recycling");
document.write("<option value='http://www.webdeveloper.com/tourism/index.html'>Tourism");
document.write("</select>");

Here's the deal: I want the link to open in a new window *only* if the user selects the Recycling option in the pulldown menu. What am I missing?
function changeURL(param){
if (param="/recycling/index.html"){
window.open(param)
}
else{
window.location.href= param;
}
}
<!--
document.write("<select name=quicklink onChange='changeURL(options[selectedIndex].value)'>");
document.write("<option selected value='http://www.webdeveloper.com/index.html'> ------- Quick Link ------- ");
document.write("<option value='http://www.webdeveloper.com/index.html'>Home");
document.write("<option value='http://www.webdeveloper.com/business/index.html'>Business");
document.write("<option value='http://www.webdeveloper.com/recycling/index.html'>Recycling");
document.write("<option value='http://www.webdeveloper.com/tourism/index.html'>Tourism");
document.write("</select>");