By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

document.form.submit() doesn't work for large form fields

P: n/a
Hello all. I am having a problem with the submit() method that is
driving me nuts. I'm using document.form.submit() with large text
fields (approx. 2000 characters) and am getting a "Invalid Syntax"
error. If I do the same thing with a text field of under 1500
characters, it works fine.

Is there some size limit here that I don't know about? Haven't been
able to find anything so far on this particular problem.

Thanks,
Alan

Mar 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
alan_atwood wrote:
Hello all. I am having a problem with the submit() method that is
driving me nuts. I'm using document.form.submit() with large text
fields (approx. 2000 characters) and am getting a "Invalid Syntax"
error. If I do the same thing with a text field of under 1500
characters, it works fine.
Is there some size limit here that I don't know about? Haven't been
able to find anything so far on this particular problem.


Your form probably has method="get" which has a size limit in different
browsers. This problem would exist even if you used a submit button and no
javascript.
Use method="post" instead.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Mar 2 '06 #2

P: n/a
VK

alan_atwood wrote:
Hello all. I am having a problem with the submit() method that is
driving me nuts. I'm using document.form.submit() with large text
fields (approx. 2000 characters) and am getting a "Invalid Syntax"
error. If I do the same thing with a text field of under 1500
characters, it works fine.

Is there some size limit here that I don't know about? Haven't been
able to find anything so far on this particular problem.


Are you using GET or POST in your form?

In what browser are you seeing the error?

Mar 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.