Discount Perfume - Turquoise Jewelry - Debt Consolidation - Debt Consolidation - Bollywood India forum movie reviews

PDA

View Full Version : AJAX problem


Agent_Dweeb
Dec 7th 2007, 1:15 pm
dnscrub.com


Go to there and right now it says in a pop up window

'There was a problem with the request'

Here is the piece of code regarding this

function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//alert(http_request.responseText);
result = http_request.responseText;
document.getElementById('myspan').innerHTML = result;
} else {
alert('There was a problem with the request.');
}
}
}

Can anyone explain to me what it means?
and how to fix the problem and for the whole site to work again

Thanks a lot and rep will be given!

Mike H.
Dec 7th 2007, 1:42 pm
See:

http://ajaxforums.net/index.php?topic=871.0

hrcerqueira
Dec 7th 2007, 3:41 pm
It means that the status of the request was no 200 (the success status), and any other one like the famous 400 (server error), 500 (client error, usually troubles in connection), 404 (page not found), etc. It would be useful to know the error code, it would help you a lot. Replace alert('There was a problem with the request.'); by alert(http_request.status);, then report back the result here.

Hope it helps...

Agent_Dweeb
Dec 8th 2007, 5:23 am
Let me change that just for you then :)