# Remote function and template

**URL:** <https://www.ruby-forum.com/t/remote-function-and-template/121032>\
**Category:** Rails\
**Created:** [November 22, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/remote-function-and-template/121032 "2007-11-22T23:46:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 22, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/remote-function-and-template/121032/1 "2007-11-22T23:46:40Z")

</div>

Hi,

I am making a call to remote\_function, which updates a variable that I  
need to use in my current view. Call is happening, but the variable is  
not getting updated?

PS: And to avoid missing template error , in my remote function I am  
doing this: render :nothing =\> true, :layout =\> false.

Please Suggest.  
Regards,  
Sandeep G

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 22, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/remote-function-and-template/121032/2 "2007-11-22T23:55:58Z")

</div>

On 22 Nov 2007, at 22:46, Sandeep G. wrote:

> Hi,
> 
> I am making a call to remote\_function, which updates a variable that I  
> need to use in my current view. Call is happening, but the variable is  
> not getting updated?
> 
> PS: And to avoid missing template error , in my remote function I am  
> doing this: render :nothing =\> true, :layout =\> false.

What are you actually doing?

Fred

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 23, 2007, 11:26am UTC](https://www.ruby-forum.com/t/remote-function-and-template/121032/3 "2007-11-23T11:26:48Z")

</div>

Frederick C. wrote:

> On 22 Nov 2007, at 22:46, Sandeep G. wrote:
> 
> > Hi,
> > 
> > I am making a call to remote\_function, which updates a variable that I  
> > need to use in my current view. Call is happening, but the variable is  
> > not getting updated?
> > 
> > PS: And to avoid missing template error , in my remote function I am  
> > doing this: render :nothing =\> true, :layout =\> false.
> 
> What are you actually doing?
> 
> Fred

Thanks Fred.  
I used rjs to replace html of div that element i had to update. That  
worked.
