Max parameter length send to the server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raknin
    New Member
    • Oct 2007
    • 82

    Max parameter length send to the server

    Hi,

    I am using PHP on the server side and javascript on the client side. I ecounter a problem when I try to send to the server parameter with value of 350 charecter and more.
    I know that I can split the string I send, and send it saperatly to the server and then reassemble it on the server. My question is how can I transfer to the server string with 350 char and more in native manner. For example if I try to transfer:
    [HTML]
    <object width="425" height="355"><p aram name="movie" value="http://www.youtube.com/v/IkpuAQIdoD4&hl= en"></param><param name="wmode" value="transpar ent"></param><embed src="http://www.youtube.com/v/IkpuAQIdoD4&hl= en" type="applicati on/x-shockwave-flash" wmode="transpar ent" width="425" height="355"></embed></object>[/HTML]

    The string trancated.

    Any suggestions?
    Last edited by gits; May 5 '08, 11:32 AM. Reason: added code tags
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    How are you sending your parameter to the server?

    Comment

    • raknin
      New Member
      • Oct 2007
      • 82

      #3
      I sending the data through ajax call

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        I couldn't understand the question well, but as far as I understand it, I think you need to use post method in Ajax, while you are using get method.

        Comment

        • raknin
          New Member
          • Oct 2007
          • 82

          #5
          Originally posted by hsriat
          I couldn't understand the question well, but as far as I understand it, I think you need to use post method in Ajax, while you are using get method.
          the problem is simple if you pass to the server parmeter with a value that is great than N charecter only part of the string is deliver to the server,and the other part is lost. It is happen on IE6 I did try it yet on Firefox.

          Comment

          • hsriat
            Recognized Expert Top Contributor
            • Jan 2008
            • 1653

            #6
            Originally posted by raknin
            the problem is simple if you pass to the server parmeter with a value that is great than N charecter only part of the string is deliver to the server,and the other part is lost. It is happen on IE6 I did try it yet on Firefox.
            Did you try using post method?

            Comment

            • raknin
              New Member
              • Oct 2007
              • 82

              #7
              I got the sameresult with post and get

              Comment

              • hsriat
                Recognized Expert Top Contributor
                • Jan 2008
                • 1653

                #8
                Post your code ......

                Comment

                • raknin
                  New Member
                  • Oct 2007
                  • 82

                  #9
                  Thanks for your help,

                  I solved the problem.The problemwas that in the parameter that was passed tothe server was number of & that cause the string to be truncated. The solution was to replace the & with well known string and then on the server side treplace this string again.

                  Comment

                  • hsriat
                    Recognized Expert Top Contributor
                    • Jan 2008
                    • 1653

                    #10
                    Originally posted by raknin
                    Thanks for your help,

                    I solved the problem.The problemwas that in the parameter that was passed tothe server was number of & that cause the string to be truncated. The solution was to replace the & with well known string and then on the server side treplace this string again.
                    Instead of just replacing the &, always apply encodeURICompom ent() to the string you are sending to the server with Ajax.

                    Comment

                    Working...