Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 21st, 2006, 05:04 AM
Registered User
 
Join Date: Nov 2006
Location: Mumbai, Maharastra, India.
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);
http_request.send(null);

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






Yours
Mohan Karunanidhi
Reply With Quote
  #2 (permalink)  
Old November 21st, 2006, 05:25 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
Reply With Quote
  #3 (permalink)  
Old November 21st, 2006, 06:11 AM
Registered User
 
Join Date: Nov 2006
Location: Mumbai, Maharastra, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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");
http_request.send(submitString);

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

Yours
Mohan Karunanidhi
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.