need help with form submit script

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i have a form on my website for people to contact me (http://kbjr.x10hosting.com/ctec/info/contact/) and the scripts all work fine in IE but in FF it won't even run the script. i think it has to do with my submit link.
HTML:
<a href="/#" class="submit" onclick="javascript:submit()">Continue</a>
(ignore the / before the #)

could someone please help me?

if you need more information i can give it.
 
Last edited:

VPmase

New Member
Messages
914
Reaction score
1
Points
0
More info is definitely needed. Its most likely you JS.
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
IE's too forgiving. submit() isn't a function, it should be called through the form object. Give your form a name if you haven't already and try this instead:

HTML:
<a href="/#" class="submit" onclick="document.forms.Form_Name_Here.submit(); return false;">Continue</a>
 

crisp

New Member
Messages
85
Reaction score
0
Points
0
IE's too forgiving. submit() isn't a function, it should be called through the form object. Give your form a name if you haven't already and try this instead:

HTML:
<a href="/#" class="submit" onclick="document.forms.Form_Name_Here.submit(); return false;">Continue</a>

Just referencing the current form object is enough to make it work for a single form...
HTML:
<a href="/#" class="submit" onclick="this.form.submit();">Continue</a>
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
Unfortunately, you can't use 'this.form' in an object that isn't a form element. An anchor isn't considered part of a form, so you have to access the form through the document object.
 

crisp

New Member
Messages
85
Reaction score
0
Points
0
Unfortunately, you can't use 'this.form' in an object that isn't a form element. An anchor isn't considered part of a form, so you have to access the form through the document object.
My apologies, you are indeed correct :) (it's early here, guess I need another coffee)
 
Top