...

View Full Version : If value "6.00" change ship_method value to "1.00"



isaaclloyd
03-22-2005, 05:08 PM
*Edit* I found that this script works, I just needed to add my form name instead of just form in the if(document.form.shipping.value == "6.00") part. Mine was if(document.myform.shipping.value == "6.00")


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
new1 = "Test";
new2 = "Test2";
new3 = "Test3";

function checkFormShipping() {

if(document.form.shipping.value == "6.00") {
document.form.ship_method.value=new1;
}

else if(document.form.shipping.value == "13.00") {
document.form.ship_method.value=new2;
}

else if(document.form.shipping.value == "20.00") {
document.form.ship_method.value=new3;
}
else {
document.form.ship_method.value="Not Selected2";
}
}
// End -->
</script>

<SELECT NAME="shipping" SIZE="1" style="font-family: Arial; font-size: 10px" onblur="checkFormShipping();">
<OPTION VALUE="">Shipping Method...</option>
<OPTION VALUE="6.00">UPS Ground ($6.00)</option>
<OPTION VALUE="13.00">UPS 2nd Day Air ($13.00)</option>
<OPTION VALUE="20.00">UPS 2nd Day AK/HI ($20.00)</option>

<input type=hidden name=ship_method value="Not Selected">


~Isaac Lloyd~



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum