D
design
Greetings,
I have defined functions using instructions found in O'Reilly's
"JavaScript: The Definitive Guide 4th Edition." When I call on the
functions I get this type of error message.
Error: test is not defined
There is a second error message that only shows with up with some calls
to test(). Since the left-hand operand is an object property I don't
know what I'm doing wrong here.
Error: invalid assignment left-hand side
Source Code:
document.uf-s.shipping.value = 0;
<script language="JavaScript">
function test(){
alert('Function call succeeded');
document.uf-s.shipping.value = 0;
}
</script>
<form name="uf-s" onsubmit="return test();">
<input type="hidden" name="shipping" value="19.00">
<input type="submit">
</form>
Thank you to everyone who can help with this problem.
Mountain Man
I have defined functions using instructions found in O'Reilly's
"JavaScript: The Definitive Guide 4th Edition." When I call on the
functions I get this type of error message.
Error: test is not defined
There is a second error message that only shows with up with some calls
to test(). Since the left-hand operand is an object property I don't
know what I'm doing wrong here.
Error: invalid assignment left-hand side
Source Code:
document.uf-s.shipping.value = 0;
<script language="JavaScript">
function test(){
alert('Function call succeeded');
document.uf-s.shipping.value = 0;
}
</script>
<form name="uf-s" onsubmit="return test();">
<input type="hidden" name="shipping" value="19.00">
<input type="submit">
</form>
Thank you to everyone who can help with this problem.
Mountain Man