473,573 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Http request error when using AJAX

10 New Member
Hi all,

I am using AJAX to submit a data from a web page, it is properly working on the local host (when test with the local machine it is ok).also when access from another machine the pages are properly lord. But when send data it gives an http request error.

The following is the error message. it include several suggestions, but i cant exactly deiced what it is.?

pls anyone can help me to find the reason for this...

Expand|Select|Wrap|Line Numbers
  1. ERROR
  2. The requested URL could not be retrieved
  4. While trying to process the request:
  6. POST /OmniPreferedRoaming/Omni%20Preferred%20Roamer/Action/add-operator-action.jsp?action=add&opCountry=CAN&opName=can2&opCC=456&opNDC=6325&opMCC=156&opMNC=0036&sid=0.6507964352578459 HTTP/1.1
  7. Host:
  8. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070309 Firefox/
  9. Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  10. Accept-Language: en-us,en;q=0.5
  11. Accept-Encoding: gzip,deflate
  12. Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  13. Keep-Alive: 300
  14. Proxy-Connection: keep-alive
  15. Referer:
  16. Cookie: JSESSIONID=5692686F83690546771C7B1E7B6B02DF
  17. Proxy-Authorization: Basic cnBqYW5ha2E6YTdoMzEkNW0=
  18. Pragma: no-cache
  19. Cache-Control: no-cache
  22. The following error was encountered:
  24.     * Invalid Request 
  26. Some aspect of the HTTP Request is invalid. Possible problems:
  28.     * Missing or unknown request method
  29.     * Missing URL
  30.     * Missing HTTP Identifier (HTTP/1.0)
  31.     * Request is too large
  32.     * Content-Length missing for POST or PUT requests
  33.     * Illegal character in hostname; underscores are not allowed
Mar 28 '07 #1
5 2370
16,027 Recognized Expert Moderator MVP
Post your code.
Mar 28 '07 #2
10 New Member
function sendRequest(url ){
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
alert ("Your browser does not support AJAX!");
url=url+"&sid=" +Math.random();
xmlHttp.onready statechange=sta teChanged;
xmlHttp.open("P OST",url,true) ;
xmlHttp.send(nu ll);

function GetXmlHttpObjec t()
var xmlHttp=null;
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
catch (e)
Mar 28 '07 #3
10 New Member
this error is only reported with the Mozilla browser, when it use IE, there is no error and AJAX functions are working properly...in mozilla browser also it is working if the server also running on the same computer..

what could be the reason for that...?
Mar 28 '07 #4
16,027 Recognized Expert Moderator MVP
For POST requests you need to send the variables, not null. See link. See if that solves your problem.
Mar 28 '07 #5
10 New Member

thanks very much ...
Mar 29 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
by: Rein Petersen | last post by:
Hi All, I've recently been intrigued with this notion of "Service Streaming": http://ajaxpatterns.org/HTTP_Streaming in which you make use of the webserver and browsers ability to maintain a connection using a loop on the web server. I know those of you familiar with how IIS/asp.net (aspnet_isapi.dll) handles HttpApplication threads (a...
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great with Firefox,but with IE6 the onFailure never gets called and the request never completes. My code: var ajaxReq = new Ajax.Request( url,...
by: arunprabu | last post by:
Hi, I have a problecm with the AJAX request in my webpage. I have some filters on top of the page. I have a submit button and an empty div below the filters. Some of the filters have ajax requests to update the content within the filters. For example, I have 2 drop downs, one for state and another for country. When I select a country in...
by: Evil Otto | last post by:
My page loads, and calls an init() function that returns content to a div on the page, as well as setting a $_SESSION variable. The content it returns includes a link that calls the same variable, but I get an error that says the index isn't defined. The second two calls are AJAX-generated. The second call immediately echos the $_SESSION...
by: santhoskumara | last post by:
How to request to servlet from Ajax and also I got the DOM object in the servlet through Business Logic. Now how will i pass the DOM object from serlvet to Clientside. Where in the client Side i am using Ajax. kindly advice me.
by: Sebarry | last post by:
Hi, I have a Javascript function that creates an Ajax Request object in order to retrieve data from a database using a PHP script. The Javascript function is invoked by another Javascript function and should return to the caller only once the request is complete. Currently the function that creates the Ajax.Request object returns to the caller...
by: C. (http://symcbean.blogspot.com/) | last post by:
Hi all, I'm dabbling with an Ajax datagrid control and am looking to see if I can make it a bit more sophisticated. I've got a PHP script, let's call it page.php which renders a page with a fancy dhtml table (http://dhtmlx.com/docs/products/dhtmlxGrid/ index.shtml) this connects to another script which provides the XML datafeed to...
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why is my AJAX page not updated properly when using an HTTP GET request in Internet Explorer? ----------------------------------------------------------------------- Microsoft Internet Explorer caches the results of HTTP GET requests. To ensure that the...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.