Forum Moderators: open
<form action="shoppingcart.cfm" class="nospace" name="productselect" onSubmit="return OnSubmitForm();">
this:
<input type="image" src="images/addtowishlist.gif" width="96" height="16" border="0" class="addtowishlist" onClick="document.pressed=this.value" VALUE="wishlist">
and this:
<SCRIPT language="JavaScript">
<!--
function OnSubmitForm()
{
if(document.pressed == 'shoppingcart')
{
document.productselect.action ="shoppingcart.cfm";
}
else
if(document.pressed == 'wishlist')
{
alert('hello!');
document.productselect.action ="wishlist.cfm";
}
return true;
}
//-->
</SCRIPT>
Clicking the "wishlist" image pops up the alert box, and then proceeds on to "shoppingcart.cfm" NOT "wishlist.cfm". IE debugging tells me "object doesn't support this property or method", referring to my attempt to revise the "action" attribute.
The kicker is, I DID THIS EXACT SAME THING ON ANOTHER PROJECT AND IT WORKS FINE! I know there must be something different here, but I sure can't see it.
Help? Please?
Thanks.