By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Max parameter length send to the server

P: 82
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"><param name="movie" value="http://www.youtube.com/v/IkpuAQIdoD4&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/IkpuAQIdoD4&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>[/HTML]

The string trancated.

Any suggestions?
May 4 '08 #1
Share this Question
Share on Google+
9 Replies


hsriat
Expert 100+
P: 1,654
How are you sending your parameter to the server?
May 4 '08 #2

P: 82
I sending the data through ajax call
May 4 '08 #3

hsriat
Expert 100+
P: 1,654
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.
May 4 '08 #4

P: 82
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.
May 4 '08 #5

hsriat
Expert 100+
P: 1,654
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?
May 4 '08 #6

P: 82
I got the sameresult with post and get
May 4 '08 #7

hsriat
Expert 100+
P: 1,654
Post your code ......
May 5 '08 #8

P: 82
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.
May 5 '08 #9

hsriat
Expert 100+
P: 1,654
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 encodeURICompoment() to the string you are sending to the server with Ajax.
May 5 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.