Home > CakePHP, Php programming > Problem in Mozilla Firefox-Easy AJAX Pagination Using JQuery CakePHP

Problem in Mozilla Firefox-Easy AJAX Pagination Using JQuery CakePHP

Hello Friends,

I was working with CakePHP’s Easy AJAX Pagination Using JQuery. I found this as a great code for sorting and paging with jQuery inCakePHP. But i faced a problem in Mozilla Firefox. It is not working in Mozilla Firefox. While in IE and Crome it works fine for me. For Mozilla Firefox when i debug it, it shows an error like “501 Method Not Implemented”. I searched for this error and Google gives the solution likeClearing Cache and Cookie. But neither works for me. Finally i got the issue and the problem is in jQuery load function.

 /**
* Loads in a URL into a specified divName, and applies the function to
* all the links inside the pagination div of that page (to preserve the ajax-request)
* @param string href The URL of the page to load
* @param string divName The name of the DOM-element to load the data into
* @return boolean False To prevent the links from doing anything on their own.
*/
function loadPiece(href,divName) {
$(divName).load(href, {}, function(){
var divPaginationLinks = divName+” #pagination a”;
$(divPaginationLinks).click(function() {
var thisHref = $(this).attr(“href”);
loadPiece(thisHref,divName);
return false;
});
});
}
 If you open the above link and look at jQuery load function. They have passed the second parameter as {} for data. So that was the problem in Mozilla Firefox. You can remove the {} from jQuery load function.
If you find any problem in this than let me know by comment.
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: