Greetings.
Suppose I have some function called "CheckIt" - some function to
validate form data before submitting it to e CGI script. Pretend the
name of the form is "TheForm".
If I use the following code, everything work perfctly:
<Input type=button VALUE="Submit your form"
onClick="javascript:return CheckIt(TheForm)">
But, if I try to associate the submission with a graphic (call it
"submit_botton.gif"), using the following, I get an error:
<a href="javascript:return CheckIt(AbsForm)">
<img src="images/submit_button.gif" border=0></a>
the error message I get is:
"invalid return"
Using the Javascript console in Mozilla, it points to line 1, which is
indicated to be
javascript:return CheckIt(AbsForm)
I've tried several things, to no avail. I'm puzzled, because I've used
similar approaches (to associating functions with images), without any
problems.
Any suggestions? Pointers to the "obvious mistake"? :-)
Thanks in advance...