Jquery pagination and Href Problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Jquery pagination and Href Problem

i have developed a php based search page, that search from database and it has php based pagination,
and from my index page, i am calling that search page using jquery into the resutlist div tag.

it all works fine till now,
but when i click on next of the pagination link, it took me to the search result page,
what i want , is a way that the next href of search page (php pagination) to be called and show its result on the same div tag, without refreshing that page,,

On my index page, i have this code to search and fetch result to resultlist div tag.
        $('#search').click(function() {
        $('#resultlist').html('Loading, Please wait....');
                var searchVal = $('#q').val();
                        type: 'GET',
                        url: 'do_search.php',
                        data: 'keyword=' + searchVal,
                        dataType: 'html',
                        success: function(response) {

and on my search page, the next href pass some querystrings like

now, all i need is that the http://localhost/saavn/do_search.php?pagenum=2 <-- this link to be load into that resutlist without redirection or anythign else.

remeber, the next link is on the search page, that is called asynchornously using jquery.

Looking forward to hear from you soon