# Replace\_html help

**URL:** <https://www.ruby-forum.com/t/replace-html-help/131793>\
**Category:** Rails\
**Created:** [March 13, 2008, 9:43am UTC](https://www.ruby-forum.com/t/replace-html-help/131793 "2008-03-13T09:43:44Z")\
**Posts on this page:** 2\
**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:** [March 13, 2008, 9:43am UTC](https://www.ruby-forum.com/t/replace-html-help/131793/1 "2008-03-13T09:43:44Z")

</div>

I have posted a similar question pls ignore that

I have a file define\_sd\_resolution.rhtml…In that an ajax form is there

\<%= form\_remote\_tag :update =\> “update\_sd\_resolution\_ui”,  
:url =\> { :action =\> ‘sd\_resolution\_save’,  
:id =\> @sd\_ticket.id,  
:sd\_resolution\_id=\>@sd\_resolution\_id},  
:class =\> ‘itilform’%\>

The complete file is inside a div

WHAT I NEED IS AFTER THE OPERATION IN ACTION sd\_resolution\_save TO  
REPLACE THE DIV WITH ANOTHER PARTIAL FILE  
\_view\_sd\_resolution\_details.AND I TRIED LIKE BELOW  
I CREATED AN RJS FILE WITH SAME NAME AS THE ACTION ie,  
sd\_resolution\_save.rjs

page[:update\_sd\_resolution\_ui].replace\_html :partial =\>  
“service\_desk\_part/view\_sd\_resolution\_details”, :object =\> @sd\_ticket,  
:object =\> @hour\_and\_minute

THIS CALLS \_view\_sd\_resolution\_details…BUT THE RESULT I GET IS

ry { $(“update\_sd\_resolution\_ui”).update("\074div  
id=‘create\_sd\_resolution\_ui’\076\n\n\n\n\n\n\074table border=“0”  
width=“100%”\076\n \074tr\076\n \074td class=“itillink1”\076\n \n  
\074DDND SOME BLA…

WHERE IS THE FAULT  
PLEASE HELP  
SIJO

---

<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:** [March 13, 2008, 10:45am UTC](https://www.ruby-forum.com/t/replace-html-help/131793/2 "2008-03-13T10:45:17Z")

</div>

here I got solution with removing :update in form\_remote\_tag

Sijo
