# Ajax pagination and RJS

**URL:** <https://www.ruby-forum.com/t/ajax-pagination-and-rjs/135593>\
**Category:** Rails\
**Created:** [April 23, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/ajax-pagination-and-rjs/135593 "2008-04-23T13:04:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [April 23, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/ajax-pagination-and-rjs/135593/1 "2008-04-23T13:04:59Z")

</div>

Hi  
I have view code like(The view is completely inside div  
view\_sd\_attachment)  
\<%= will\_paginate @sd\_attachments, :remote =\> {  
:url=\>{:action=\>‘sd\_attachment\_pagination’,:id=\>@sd\_ticket} }, :renderer  
=\> ‘RemoteLinkRenderer’ %\>

And in action ‘sd\_attachment\_pagination’ the code as below

def sd\_attachment\_pagination

@sd\_ticket=ServiceDeskTicket.find(params[:id])  
@sd\_attachments=@sd\_ticket.service\_desk\_attachments.display\_sd\_attachments(params[:page])

end

And I wrote a corresoponding sd\_attachment\_pagination.rjs as  
page[:view\_sd\_attachment].replace\_html :partial =\>  
‘service\_desk\_part/view\_sd\_attachment\_details’

But the div is not replaced.But the data is printed on background and  
all.Why the div is not replaced

Thanks in advance  
Sijo
