Javascript is throwing errors
Hi Jason:
I needed to adapt the script to work with my form and it's just not working. I'm not very fluent in javascript, so I hope someone can look at this and tell me why it's throwing errors. Thanks!
<SCRIPT LANGUAGE="JavaScript">
// <!--
function shipsame(WADAInsertForm){
if(WADAInsertForm.sameasbilling.checked){
WADAInsertForm.address.value = WADAInsertForm.second_address.value;
WADAInsertForm.address2.value = WADAInsertForm.second_address2.value;
WADAInsertForm.city.value = WADAInsertForm.second_city.value;
WADAInsertForm.state.value = WADAInsertForm.second_state.value;
WADAInsertForm.zip.value = WADAInsertForm.second_zip.value;
}
}
else{
WADAInsertForm.address.value = "";
WADAInsertForm.address2.value = "";
WADAInsertForm.city.value = "";
WADAInsertForm.state.value = "";
WADAInsertForm.zip.value = "";
}
//-->
</script>
<input type="checkbox" name="sameasbilling" value="checkbox"
onClick="shipsame(this.WADAInsertForm);">