[Javascript] Form submission problem

Laurent Muchacho LaurentM at london.virgin.net
Tue Aug 17 05:16:44 CDT 2004


Hi 

The error is the input type submit called "submit"
If you called your input type submit name="submit" then there will be a
conflict when the browser will try to execute the function
document.errorform.submit() the browser will then access the input type
submit and then return the error you get.

document.errorform  = reference to your form 
document.errorform.submit = reference to the input type submit an input type
submit is not a function but an object
document.errorform.submit() = reference to the function to submit the form 

Hope this is clear

Regards

Laurent

-----Original Message-----
From: richf at ukonline.co.uk [mailto:richf at ukonline.co.uk]
Sent: 17 August 2004 10:59
To: javascript at LaTech.edu
Subject: [Javascript] Form submission problem


Hi all,

I am using the following code to try and give a text link to submit a form.
I am
sure I have done this before but it is not working ! 

<a href="javascript:document.errorform.submit();">Fill in missing
information</a>
<form name="errorform" method="post"
action="show_survey.php?survey=1&authority=2&page=1">
<input type="hidden" name="2" value="2" />
<input type="submit" name="submit" value="fill in missing information" />
</form>


Any ideas why ? I get a 

Error: document.errorform.submit is not a function
Source File: javascript:document.errorform.submit();
Line: 1

Thanks,

Richard

----------------------------------------------
This mail sent through http://www.ukonline.net
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


This E-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this E-mail in error please notify the system manager.  This message contains confidential information and is intended only for the individual named.  If you are not the named addressee you should not disseminate, distribute or copy this E-mail.



More information about the Javascript mailing list