Size limit for submit using post ?

G

Gerard Cany

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_EnregistrerFicheInclusion")%>"
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 : (e-mail address removed)
 
V

VK

... value="<%=Session("Bouton_EnregistrerFicheInclusion")%>" 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_EnregistrerFicheInclusion\")%>"...

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

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.
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top