473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Http request error when using AJAX

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 2359
acoder
16,027 Expert Mod 8TB
Post your code.
Mar 28 '07 #2
function sendRequest(url){
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.send(null);
}







function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
}
}
Mar 28 '07 #3
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 Expert Mod 8TB
For POST requests you need to send the variables, not null. See link. See if that solves your problem.
Mar 28 '07 #5
OK....

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

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

Similar topics

7
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. #...
2
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...
5
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...
0
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...
15
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,...
6
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...
7
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...
1
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...
3
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?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.