Jump to content

Ajax Pagination messed online, working offline on Mozilla Firefox


itpvision

Recommended Posts

Hello,

 

I have implemented paging on Mysql Records with PHP, all works fine offline, while online it produces a huge error on Mozilla Firefox

Error:

ERROR

The requested URL could not be retrieved

 

While trying to process the request:

 

POST /prod_ajax.php?page=5 HTTP/1.1Host: www.vijewellery.com

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

Accept: application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://www.vijewellery.com/prod.php

Cookie: PHPSESSID=8caa6us3ovb0viqrrp5fj70uv1

Pragma: no-cache

Cache-Control: no-cache

The following error was encountered:

    * Invalid Request

Some aspect of the HTTP Request is invalid. Possible problems:

    * Missing or unknown request method

    * Missing URL

    * Missing HTTP Identifier (HTTP/1.0)

    * Request is too large

    * Content-Length missing for POST or PUT requests

    * Illegal character in hostname; underscores are not allowed

 

Your cache administrator is webmaster.

 

My Code:

prod.php

function Submit_To_Ajax(page) {

xmlHttp = AjaxHttpObject();

if (xmlHttp==null) {

alert("Your browser does not support AJAX !!!");

return;

}

xmlHttp.onreadystatechange=StateChanged;

xmlHttp.open("POST", page, true);

xmlHttp.send(null);

}

function StateChanged() {

if (xmlHttp.readyState == 4) {

document.getElementById('AjaxDiv').innerHTML=xmlHttp.responseText;

}

else {

document.getElementById('AjaxDiv').innerHTML='<img src="images/loading_circles.gif" width="30" height="30">';

}

}

prod_ajax.php

echo " <a href=\"javascript:Submit_To_Ajax('prod_ajax.php?page=$i$query$query2')\" class = \"pagin\"

onclick=\"Submit_To_Ajax('prod_ajax.php?page=$i$query$query2')\">$i</a> " ;

 

Help APPRECIATED

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.