• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textbox submission length limitation?

 
Bob Grossman
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an HTML form with a textbox with no limitation on the length of its contents. Submission of the form (traditional, not AJAX) causes the page to reload with some additional information, preserving the textbox and its contents. If I enter a longish string into the textbox (ca. 850 characters or more), I can submit the form once. But I cannot submit again unless I shorten the textbox content to about 750 characters or less -- the URL bar flashes, but the page does not change, and the log shows that the Java on the page has not been executed. One might think that there's a Javascript or HTML error in the form in the reloaded page, but that's not the case, because if I shorten the contents of the textbox, I can submit as many times as I like, even after a failed submission of the longish string; however, if I restore the original length, again I cannot submit. If I leave the page and then return, I am again allowed one submission of the longish string. This occurs in several browsers, both PC and Mac.

Any idea what’s causing the problem, and do you know of any solution? I’ve not been able to find anything relevant on the Web. The really weird thing is the one-submission limit. I’d think if there was a limit on the size of the string, I wouldn’t be able to submit at all.
 
Murali Narayanaswamy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try method="POST" while submitting the page. By default submit invokes "GET". During "GET" method, data is restricted while communication to other pages.

Thanks
Murali
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Grossman wrote:I have an HTML form with a textbox with no limitation on the length of its contents.


why you want this ?
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


textarea wouldnt suffice ?
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why dont you use javascript ? Secondly, use textarea as textbox will display data in a single line & it wont be user friendly.

Cheers,

Ujjwal B Soni

<baroda>
<gujarat>
<india>
<919998971048>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think that the use of a textarea over a text box has any bearing on this issue.

The intermittent nature of the issue has me puzzled, but yes, POST should be preferred for form submissions over GET. (Why GET was chosen as the default, I'll never figure out.)
 
Bob Grossman
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I misspoke, I did use textarea, not textbox. I called it textbox because it shows up as a box on the page.

Indeed, specifying method="post" solves the problem. Thanks for the tip.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Text box vs textarea (or vice versa) isn't germane. Regardless of the type of control used, the HTTP request is identical.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic