Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 21st, 2006, 05:04 AM
Registered User
Join Date: Nov 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Maximum length of http Object

Hi all,

Iam new to Ajax . Can anybody tell me what is the maximum lenght of the url in the xmlhttprequest object.

Actually i tried to submit my form asynchronously by the following method.
http_request.onreadystatechange = getReply;
http_request.open('POST', url, true);

but the form is not submitting since the url(String) is exceeding 2082 characters which is the limit of URL in IE(GET method)..

Even though iam using POST method it is not going beyond http_request.open

Now i am doing it normally ... I mean form.submit().Iam getting the reply correctly.

IS there any other way to submit it asynchro..ly

NOTE:Iam using Spring FRAMEWORK

Mohan Karunanidhi
Old November 21st, 2006, 05:25 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

I don't quite understand, you claim to be using the POST method yet you send null instead of your form's data. The query string is limited by most browsers although I don't think it's constant across them all. That's one of the reasons why using POST is better.


Joe (Microsoft MVP - XML)
Old November 21st, 2006, 06:11 AM
Registered User
Join Date: Nov 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

Actually i tried the following also ...

http_request.onreadystatechange = getReply;
http_request.open('POST', url+ '?'+submitString , true);
http_request.setRequestHeader("Content-length", submitString.length);
http_request.setRequestHeader("Connection", "close");
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

But nothing Happened!!!

if send it through the url(submitString)and http.send(null) the problem occurs only if submitstring.length()>2082 ..

please correct me if i did any mistakes

Mohan Karunanidhi

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP HEAD not showing content-length atacus Beginning PHP 0 August 30th, 2006 09:39 PM
Maximum Request Length exceeded? dparsons ASP.NET 1.0 and 1.1 Professional 0 March 23rd, 2006 12:41 AM
make textbox maximum length of <td> cell crmpicco Javascript How-To 0 October 19th, 2005 10:46 AM
Maximum Length for XSL variable vlad027 XSLT 4 January 29th, 2004 12:04 PM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.