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
  3.  
  4. While trying to process the request:
  5.  
  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: 172.16.7.49:8080
  8. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
  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: http://172.16.7.49:8080/OmniPreferedRoaming/Omni%20Preferred%20Roamer/add-operator.jsp
  16. Cookie: JSESSIONID=5692686F83690546771C7B1E7B6B02DF
  17. Proxy-Authorization: Basic cnBqYW5ha2E6YTdoMzEkNW0=
  18. Pragma: no-cache
  19. Cache-Control: no-cache
  20.  
  21.  
  22. The following error was encountered:
  23.  
  24.     * Invalid Request 
  25.  
  26. Some aspect of the HTTP Request is invalid. Possible problems:
  27.  
  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
acoder
16,027 Recognized Expert Moderator MVP
Post your code.
Mar 28 '07 #2
rpjanaka
10 New Member
function sendRequest(url ){
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
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;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
}
catch (e)
{
}
}
Mar 28 '07 #3
rpjanaka
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
acoder
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
rpjanaka
10 New Member
OK....

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

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

Similar topics

7
9273
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
2
1984
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...
5
20058
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,...
0
1825
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...
15
5939
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...
6
4968
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.
7
14462
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...
1
3820
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...
3
1390
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...
0
7771
marktang
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...
0
7686
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...
0
8009
Oralloy
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. ...
0
8198
jinu1996
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...
1
7771
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...
1
5580
isladogs
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...
0
3730
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...
0
3731
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1296
muto222
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.