aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes textbox submission length limitation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "textbox submission length limitation?" Watch "textbox submission length limitation?" New topic
Author

textbox submission length limitation?

Bob Grossman
Ranch Hand

Joined: Dec 18, 2008
Posts: 69
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

Joined: May 29, 2007
Posts: 24
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jan 01, 2009
Posts: 874



textarea wouldnt suffice ?
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
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>


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

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.)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bob Grossman
Ranch Hand

Joined: Dec 18, 2008
Posts: 69
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

Joined: Jan 10, 2002
Posts: 61606
    
  67

Text box vs textarea (or vice versa) isn't germane. Regardless of the type of control used, the HTTP request is identical.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: textbox submission length limitation?