adding pager function to Ajax result

W Toku Opublikowano May 25, 2015 Płatność przy odbiorze
W Toku Płatność przy odbiorze

Thank you for your concern.

This is a small project (2hours top if you are experienced) to add Pagination (pager) function to

Ajax result page.

Please see and test at below page,

[login to view URL]

result display all

here we want to paginate controller at the bottom of result as

<<First <previous 123456 next > Last>> see sample code at the bottom of this detail

Ajax contains

We have 2 php files to output result

1. Form and jQuery 2. Mysql query builder and result builder

<script language="javascript" defer="defer">

function call_ajax(){

[login to view URL]();

var dataString = jQuery('#new_form').serialize();

[login to view URL]({

type: "POST",

url: "membsearch/[login to view URL]",

data: dataString,

success: function(result) {

jQuery("#page_block_327").html(result);

}

});

jQuery("[login to view URL]").hide();

}

</script>

////sample coe

//↓Result is less than10 and display only one page ( no need to display pager) otherwise display pager

if(($max_page <= 10) && ($max_page != 1)){

echo '  ';

for($i=1;$i<=$max_page;$i++){

echo '<a href="[login to view URL]'.$i.'">['.$i.']</a> ';

}

//↓result is more than 10 and current page is less than 6

}elseif(($max_page > 10) && ($genzai_page<6)){

echo '    ';

for($a=1;$a<=10;$a++){

echo '<a href="[login to view URL]'.$a.'">['.$a.']</a> ';

}

//↓result total # > 10 and current page > 6 and more than 5 from last page

}elseif(($max_page > 10) && ($genzai_page>=6) && (($genzai_page+5) < $max_page)){

echo '<a href="[login to view URL]">First</a>';

for($a=1;$a<=5;$a++){

echo '<a href="[login to view URL]'.($genzai_page-5+$a).'">['.($genzai_page-5+$a).']</a> ';

}

for($a=1;$a<=5;$a++){

echo '<a href="[login to view URL]'.($genzai_page+$a).'">['.($genzai_page+$a).']</a> ';

}

echo '<a href="[login to view URL]'.$max_page.'">Last</a>';

//↓result is more than 10 and current page is more than 6 and less than 5 from last page

}elseif(($max_page > 10) && ($genzai_page>=6) && (($genzai_page+5) >= $max_page)){

echo '<a href="[login to view URL]">First</a> ';

$b = $max_page-10;

while($b <= $max_page){

echo '<a href="[login to view URL]'.$b.'">['.$b.']</a> ';

$b++;

}

}

MySQL PHP

Numer ID Projektu: #7733841

O projekcie

12 ofert Zdalny projekt Aktywny May 25, 2015

12 freelancerów złożyło ofertę za $126 w tym projekcie

mituld

Hi I work towards providing reliable, relevant and robust IT solutions at most competitive prices to my customers. I ensure 100% customer satisfaction so lets start Thanks

$190 USD w ciągu 7 dni
(471 Oceny)
8.2
logicscreators

A proposal has not yet been provided

$105 USD w ciągu 3 dni
(125 Oceny)
7.1
techvolcano

Hi, We are experts in php/ajax. We can do the pagination as you described. Ready to start now. Thanks.

$100 USD w ciągu 3 dni
(224 Oceny)
6.6
karand

Hi there, I have read you project description and understand perfectly what need's to be done. Please feel free to ask questions before awarding the project.

$100 USD w ciągu 0 dni
(245 Oceny)
5.9
openeratech

Hi, I can carry out your task I read your requirement and understand almost what i need to done I have done creation and customization of many PHP/Mysql based websites . I have 3 yrs of experience in this PHP/Mysql/Wor Więcej

$60 USD w ciągu 1 dnia
(54 Oceny)
5.5
swantech

Hi There, Ready to start right now. Thanks

$100 USD w ciągu 1 dnia
(23 Oceny)
4.8
omprakash001

Hi, I have read your requirement and i have sound knowledge about the ajax jquery php mysql and all in php like magento wordpress , coeigniter etc, I hope we will meet soon \ Thanks OM

$250 USD w ciągu 3 dni
(19 Oceny)
5.0
akilkhatri

Dear Sir/mam, I am really interested to work on this project, I can start the work now , and can provide the best services from my end. Please come on chat to discuss more about the project. Regards, Akil Khatr Więcej

$54 USD w ciągu 1 dnia
(35 Oceny)
4.8
rajneeshag

Hello, I will do it to the perfection and upto your satisfaction. I have gone through your site, please provide source files or FTP + Database details so that I will add the pagination as required. Rajneesh

$155 USD w ciągu 3 dni
(14 Oceny)
4.6
aarchi5146

Hello Sir, I read through the job details extremely carefully and I am absolutely sure that I can do the project very well. We are the team of 5+ employees and over past 3 years we have completed 100+ projects. Więcej

$147 USD w ciągu 3 dni
(0 Oceny)
0.0