# Calling local js function within form\_remote\_tag

**URL:** <https://www.ruby-forum.com/t/calling-local-js-function-within-form-remote-tag/116201>\
**Category:** Rails\
**Created:** [October 3, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/calling-local-js-function-within-form-remote-tag/116201 "2007-10-03T12:37:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shishir\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@shishir\_s](https://www.ruby-forum.com/u/shishir_s)\
**Post date:** [October 3, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/calling-local-js-function-within-form-remote-tag/116201/1 "2007-10-03T12:37:31Z")

</div>

Hi ,

I am trying to pass an additional parameter using the form\_remote\_tag  
like this

\<%= form\_remote\_tag :update =\> ‘’, :url =\> { :action =\>  
‘send\_msg’, :to =\> nowActive()}, :after =\> “clearinput()” %\>  
\<%= text\_field\_tag :newmessage, nil, {:size =\> “210”, :maxlength =\>  
“1000”,:autocomplete =\> “off”} %\>  
\<%= end\_form\_tag %\>

On running the page I get the template compile error, saying that  
nowActive is not a method in my controller class.

I guess it’s checking for the method on the server side, where I want  
to pass the parameter value derived from a local js function.

Please help.

Thanks,  
~Shishir
