2

What is the maximum capacity of a textarea that it can accept some text.The html page is working fine when the text limits to about 130-140 words.But when the text exceeds that limit it doesn't do anything(just hangs). This text is passed through javascript for some manipulations and displayed in another textarea. If there is a limit how to make it accept large amount of text?

UPDATE :

I get the following error when I check the error log

request failed: URI too long (longer than 8190)

I am using the following line to pass the text through javascript

xmlhttp.open("GET","./analyze.pl?unk="+str ,true);
Nagaraju
  • 1,853
  • 2
  • 27
  • 46

2 Answers2

1

The problem isn't with the <textarea>. The problem is that you are creating a URL that is too long.

Submit the data using a POST, not a GET and the problem will go away.

As a general rule: if you have occasion to worry about URL length, you are probably passing too much data via query string parameters. From a REST standpoint, consider that a GET is used to retrieve a resource. A GET should not be used to submit data that will create/update a resource (such as one might do when entering data into a <textarea>).

Community
  • 1
  • 1
Tim M.
  • 53,671
  • 14
  • 120
  • 163
0

I use a maxlength of 8000 on one of my sites and it didn't have any problems. Your javascript must be the cause of the problem (guessing infinite/long loops) OR it must be the browser your testing on OR your computer.

It would be best if you show your javascript code.

Jo E.
  • 7,822
  • 14
  • 58
  • 94
  • thats the error but we still need the code that caused the problem. if you cant show more info then no one can help you. but a quick google search https://www.google.com/search?q=request+failed%3A+URI+too+long&rlz=1C1ASUC_enPH552PH552&oq=request+failed%3A+URI+too+long&aqs=chrome..69i57.593j0&sourceid=chrome&espvd=210&es_sm=122&ie=UTF-8#es_sm=122&q=request+failed%3A+URI+too+long will show related concerns of the error. you might find something useful. – Jo E. Sep 28 '13 at 06:07