Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Size limit for submit using post ?

Reply
Thread Tools

Size limit for submit using post ?

 
 
Gerard Cany
Guest
Posts: n/a
 
      11-02-2003
I have a problem with a javascript that seems related to the number/size of
parameters sent by the form
The method for the form is POST (not GET, I know the size limit with
GET)
The symptom : some times, I receive a javascript error "Invalid syntax
on line xxx", this line contains the call to submit as shown in the
following lines :

<input type="button"
value="<%=Session("Bouton_EnregistrerFicheInclusio n")%>"
style="{width:100%}"
onclick="AfficherTousOnglets(); if
(form_check()){document.forms[0].submit(); }"
name="Validation">

To debug that, I inserted an alert("hello") just before the
document.forms[0].submit(); the alert message was OK, but
the "invalid syntax" on the submit was still there.
I also tried to change document.forms[0] to document.form1 (the name of
the form) and document.getelementById
The number of input fields for this form is around 250
The problem does not appear when few fields are filled.
I could not find any information on a size limit with the POST method

The navigator is IE6. The page is to complex for Netscape.
With FireBird no problem : everything work fine

Any ideas ?
Thank for your answer

Gérard Cany

Rapsodie

Batiment T4

Parc Technologique de la Pompignane

34 055 Montpellier Cedex 1

tel : 04 67 13 82 05
fax : 04 67 99 05 63
mobile : 06 07 97 64 13
E-mail : http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      11-02-2003
> ... value="<%=Session("Bouton_EnregistrerFicheInclusio n")%>" style=...

Try to split this line apart based on quotes only (this is exactly how
JavaScript interpreter does):

Option 1:
....value="[string
begins]<%=Session("Bouton_EnregistrerFicheInclusion")%> "[string ends]...
Option 2:
....value="[string begins]<%=Session("[string
ends]Bouton_EnregistrerFicheInclusion"[string begins])%>"[string ends]
Also options 3, 4, x...
What option will be selected next time, depends on unpredictable
fluctuations inside the interpreter.

This is why NEVER USE THE SAME TYPE OF QUOTES TO DELIMIT A STRING AND
INSIDE THAT STRING (print it out and attach to the monitor

Solution 1 (escaping quotes inside the string)
....value="<%=Session(\"Bouton_EnregistrerFicheInc lusion\")%>"...

Solution 2 (the best, using different types of quotes):
....value='<%=Session("Bouton_EnregistrerFicheIncl usion")%>'... or
....value="<%=Session('Bouton_EnregistrerFicheIncl usion')%>"...

P.S. Post method has no built-in transfer limitations: 1MB, 100MB or the
entire Web. But usually there are some reasonable limits set on the
server-side.


 
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
How to submit a from using JavaScript [without using submit button]? jatrojoomla Javascript 1 08-24-2006 04:46 AM
c program, file size limit, how to solve? 2G bytes limit. guru.slt@gmail.com C++ 1 06-27-2005 11:05 PM
Preventing Multiple submit (Disabling Submit Button Post Click) Solution Mark ASP .Net 1 12-13-2004 08:03 PM
Disable Submit Button on Post back and On Submit in ASP.net Ghafran Abbas ASP .Net 0 10-12-2004 06:11 PM
Limit to size of POST in forms using javax.servlet.http.HttpServlet? news.amnet.net.au Java 1 09-15-2004 05:00 AM



Advertisments