Size limit for submit using post ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gerard Cany

    #1

    Size limit for submit using post ?

    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="<%=Sessi on("Bouton_Enre gistrerFicheInc lusion")%>"
    style="{width:1 00%}"
    onclick="Affich erTousOnglets() ; if
    (form_check()){ document.forms[0].submit(); }"
    name="Validatio n">

    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.getele mentById
    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 : Gerard.Cany@rap sodie.fr


  • VK

    #2
    Re: Size limit for submit using post ?

    > ... value="<%=Sessi on("Bouton_Enre gistrerFicheInc lusion")%>" style=...

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

    Option 1:
    ....value="[string
    begins]<%=Session("Bou ton_Enregistrer FicheInclusion" )%>"[string ends]...
    Option 2:
    ....value="[string begins]<%=Session("[string
    ends]Bouton_Enregist rerFicheInclusi on"[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="<%=S ession(\"Bouton _EnregistrerFic heInclusion\")% >"...

    Solution 2 (the best, using different types of quotes):
    ....value='<%=S ession("Bouton_ EnregistrerFich eInclusion")%>' ... or
    ....value="<%=S ession('Bouton_ EnregistrerFich eInclusion')%>" ...

    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.


    Comment

    Working...