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="javasc ript: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="javascrip t:return CheckIt(AbsForm )">
<img src="images/submit_button.g if" 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:retu rn 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...
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="javasc ript: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="javascrip t:return CheckIt(AbsForm )">
<img src="images/submit_button.g if" 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:retu rn 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...
Comment