Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > document.form.submit() doesn't work for large form fields

Reply
Thread Tools

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

 
 
alan_atwood
Guest
Posts: n/a
 
      03-02-2006
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

 
Reply With Quote
 
 
 
 
Matt Kruse
Guest
Posts: n/a
 
      03-02-2006
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


 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      03-02-2006

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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
print struct fields and its member structs' fields recursively, generically call_me_anything C++ 4 09-30-2007 10:12 PM
Request.Form to retrieve looped form fields David ASP General 2 09-20-2007 01:33 PM
get all the form fields in a form Mr. SweatyFinger ASP .Net 20 01-31-2007 08:24 AM
Populate form values based on previous same form fields Rizyak Javascript 4 06-11-2004 10:31 PM
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM



Advertisments