treconomics_project/static/javascripts/ajax_search.js
/*
Switches the current search results to the page specified by the URL supplied.
*/
Switches the current search results to the page specified by the URL supplied.
Switches the current search results to the page specified by the URL supplied .
function switchToPage(url, noPerf) {
    var page_interface = $('#interface_type');
    var pageNumber = getPageNumber(url);
    if (parseInt(page_interface.val()) == 1) {
        if (interface1Querystring != "") {
            interface1Querystring += '&page=' + pageNumber;
            if (pageNumber == 1) {
                interface1Querystring += '&noperf=true';
            }
            processRequest(interface1Querystring, true);
        }
        else {
            var pageNumber = getPageNumber(url);
            var formData = $("form").serialize();
            if (pageNumber == 1) {
                formData = formData + '&page=' + pageNumber + '&noperf=true';
            }
            else {
                formData = formData + '&page=' + pageNumber;
            }
            processRequest(formData, true);
        }
    }
    else {
        var formData = $("form").serialize();
        formData = formData + '&page=' + pageNumber;
        if (pageNumber == 1) {
            formData = formData + '&page=' + pageNumber + '&noperf=true';
        }
        else {
            formData = formData + '&page=' + pageNumber;
        }
        processRequest(formData, true);
    }
}
function switchToPage ( url , noPerf ) { var page_interface = $ ( '#interface_type' ) ; var pageNumber = getPageNumber ( url ) ; if ( parseInt ( page_interface . val ( ) ) == 1 ) { if ( interface1Querystring != "" ) { interface1Querystring += '&page=' + pageNumber ; if ( pageNumber == 1 ) { interface1Querystring += '&noperf=true' ; } processRequest ( interface1Querystring , true ) ; } else { var pageNumber = getPageNumber ( url ) ; var formData = $ ( "form" ) . serialize ( ) ; if ( pageNumber == 1 ) { formData = formData + '&page=' + pageNumber + '&noperf=true' ; } else { formData = formData + '&page=' + pageNumber ; } processRequest ( formData , true ) ; } } else { var formData = $ ( "form" ) . serialize ( ) ; formData = formData + '&page=' + pageNumber ; if ( pageNumber == 1 ) { formData = formData + '&page=' + pageNumber + '&noperf=true' ; } else { formData = formData + '&page=' + pageNumber ; } processRequest ( formData , true ) ; } }
Switches the current search results to the page specified by the URL supplied.
Switches the current search results to the page specified by the URL supplied .