D
design
Greetings,
I have a situation in which an assignment operator isn't working. I'm
trying to reset the value of "document.forms.f.shipping.value" to 0.
I want this new value to be transmitted when the form is submitted.
Unfortunately, the form's shipping element's value remains set at
"19.00."
I have looked for an answer in "JavaScript: the Definitive Guide 4th
edition" and in the clj FAQ. I also reviewd clj posts dating back to
November 14.
<script language="JavaScript" type="text/javascript">
function test(f){
alert('Function call successful');
document.forms.f.shipping.value = 0;
document.forms.f.submit();
return false;
}
</script>
<form name="ufs" onsubmit="return test(ufs);" target="paypal"
action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"
/>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/
x-click-but22.gif" name="submit" />
<input type="hidden" name="shipping" value="19.00" />
</form>
I have a situation in which an assignment operator isn't working. I'm
trying to reset the value of "document.forms.f.shipping.value" to 0.
I want this new value to be transmitted when the form is submitted.
Unfortunately, the form's shipping element's value remains set at
"19.00."
I have looked for an answer in "JavaScript: the Definitive Guide 4th
edition" and in the clj FAQ. I also reviewd clj posts dating back to
November 14.
<script language="JavaScript" type="text/javascript">
function test(f){
alert('Function call successful');
document.forms.f.shipping.value = 0;
document.forms.f.submit();
return false;
}
</script>
<form name="ufs" onsubmit="return test(ufs);" target="paypal"
action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"
/>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/
x-click-but22.gif" name="submit" />
<input type="hidden" name="shipping" value="19.00" />
</form>