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

A

alan_atwood

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
 
M

Matt Kruse

alan_atwood said:
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.
 
V

VK

alan_atwood said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top