# Javascript

**URL:** <https://www.ruby-forum.com/t/javascript/117370>\
**Category:** Ruby\
**Created:** [October 16, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/javascript/117370 "2007-10-16T12:56:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [October 16, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/javascript/117370/1 "2007-10-16T12:56:22Z")

</div>

Hello

I have a controller which executes a “render :partial” to actualise part  
of my web page (a

 object). When I do that I would like to call a  
javascript function to complete my process.  
How can I do that?  
Anyone could help me?  
Thanks  
Regards

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [October 16, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/javascript/117370/2 "2007-10-16T13:24:11Z")

</div>

Paulo C. wrote:

> Hello
> 
> I have a controller which executes a “render :partial” to actualise part  
> of my web page (a
> 
> object). When I do that I would like to call a  
> javascript function to complete my process.  
> How can I do that?  
> Anyone could help me?  
> Thanks  
> Regards

post on ruby on rails forum (this is the ruby forum).  
[http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)

(aside from that, maybe posting a little more informative code will help  
out people answering)

just one fast solution i can think of (depending on u’r needs, this  
could be useless) is to call the javascript function in the partial at  
the end

render :partial → ‘some’

# and then in \_some.rhtml do

_rhtml code_  
_rhtml code_  
_rhtml code_  
.  
.  
.

my\_javascript\_funct() ========== enjoy.
