# Ajax and pagination

**URL:** <https://www.ruby-forum.com/t/ajax-and-pagination/145622>\
**Category:** Rails\
**Created:** [August 12, 2008, 8:23am UTC](https://www.ruby-forum.com/t/ajax-and-pagination/145622 "2008-08-12T08:23:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirankinuforu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/977dab/32.png) [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Post date:** [August 12, 2008, 8:23am UTC](https://www.ruby-forum.com/t/ajax-and-pagination/145622/1 "2008-08-12T08:23:14Z")

</div>

Hi,

all, I am using rjs and pagination and I have given links for pagination  
as

\<%if @photo\_pages.current.previous%\>  
\<%= link\_to\_remote (“previous”,  
:url=\>{:action=\>params[:redirect\_action], :page  
=\>@photo\_pages.current.previous,:redirect\_action=\>params[:redirect\_action],:id=\>params[:id]})%\>  
\<%end%\>

\<%if @photo\_pages.current.next%\>  
\<%= link\_to\_remote (“next”, :url=\>{:action=\>params[:redirect\_action],  
:page =\>  
@photo\_pages.current.next,:redirect\_action=\>params[:redirect\_action],:id=\>params[:id]})%\>  
\<%end%\>

```
              I want to use normal pagination that is displayed like

```

1…n pages and should hide appropriate page numbers from page number  
list.

```
               Is there any way to do this????. please reply

```

Regards,  
Kiran
