Reputation: 29
I am new to jquery and their plugins...and also creating issue first time...for any mistakes please help me to improve...
I am using jquerymobile for my website. in my website there is a search field which results lots of records so i wants to use pagination to show my results...
I used [JQuery Mobile Pagination Plugin.][1]
But its not working as expected.
In android browser, it stops dragging after two Pages..and in opera browser when i ran the code browser hangs...
I am not able to catch whether problem is with my code or there is any plugin support problem with these browser...
please help me...to understand this. if you already used this plugin.
Any help would be much appreciated.
This problem occurs when our html form name are like
http://abc/def.html?search_form_id=30&keyword=denim&submit_btn=Search#/mobile_app/search_action.html?keyword=denim&search_form_id=90&submit_btn=Search&set=1&page_no=1
http://abc/def.html?search_form_id=30&keyword=denim&submit_btn=Search#/mobile_app/search_action.html?keyword=denim&search_form_id=90&submit_btn=Search&set=1&page_no=2
http://abc/def.html?search_form_id=30&keyword=denim&submit_btn=Search#/mobile_app/search_action.html?keyword=denim&search_form_id=90&submit_btn=Search&set=1&page_no=3
http://abc/def.html?search_form_id=30&keyword=denim&submit_btn=Search#/mobile_app/search_action.html?keyword=denim&search_form_id=90&submit_btn=Search&set=1&page_no=4
these names are different only from 1 argument that is page_no and these urls are generated dynamically. Here is my code. i am using perl language.
in this case i am not able to use jquery mobile pagination plugin.
my $current_page = $form_data{page_no} || 1;
my ($prev_p,$next_p) ;
if($current_page > 1) {
$prev_p = $current_page - 1;
}
else {
$prev_p = $current_page;
}
$next_p = $current_page + 1;
<\ul data-role="pagination"><\li class="ui-pagination-prev"><\a href="/mobile_app/search_action.html?keyword=<% $keyword %>&search_form_id=30&submit_btn=Search&set=1&page_no=<% $prev_p %>">Prev\</li>
<\li class="ui-pagination-next"><\a href="/mobile_app/search_action.html?keyword=<% $keyword %>&search_form_id=30&submit_btn=Search&set=1&page_no=<% $next_p %>">Next</a></li>
</ul>
plz help now...
Upvotes: 0
Views: 1236
Reputation: 11
I found this in jquery mobile documentation. In details I focus on the last paragraph "Passing parameters between pages".
Maybe your link is passing parameters to the next page but jquery mobile framework doesn't like it this way
Upvotes: 1
Reputation: 9416
You probably forgot to clode tag in the Prev button
<ul data-role="pagination">
<li class="ui-pagination-prev">
<a href="/mobile_app/search_action.html?keyword=<% $keyword %>&search_form_id=30&submit_btn=Search&set=1&page_no=<% $prev_p %>">Prev</a>
</li>
<li class="ui-pagination-next">
<a href="/mobile_app/search_action.html?keyword=<% $keyword %>&search_form_id=30&submit_btn=Search&set=1&page_no=<% $next_p %>">Next</a>
</li>
</ul>
Upvotes: 1