# Help with rjs (basic)

**URL:** <https://discuss.rubyonrails.org/t/help-with-rjs-basic/3623>\
**Category:** rubyonrails-talk\
**Created:** [October 26, 2006, 4:20am UTC](https://discuss.rubyonrails.org/t/help-with-rjs-basic/3623 "2006-10-26T04:20:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AD11](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@AD11](https://discuss.rubyonrails.org/u/AD11)\
**Post date:** [October 26, 2006, 4:20am UTC](https://discuss.rubyonrails.org/t/help-with-rjs-basic/3623/1 "2006-10-26T04:20:52Z")

</div>

I have a rjs with:

page.replace\_html 'tag', '\<input name="abc" id="abc" value="avalue"\>' + link\_to\_remote("doit", :url =\>{ :action =\> :doit })

how I read the value of the "abc" field in the :doit remote action after the user click on the doit link?

Thanks

---

<div class="post-metadata">

**Author:** ![AD11](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@AD11](https://discuss.rubyonrails.org/u/AD11)\
**Post date:** [October 26, 2006, 4:50am UTC](https://discuss.rubyonrails.org/t/help-with-rjs-basic/3623/2 "2006-10-26T04:50:06Z")

</div>

The answer was to use prototype's $F() function which returns the value of any field input control:

page.replace\_html 'tag', '\<input name="abc" id="abc" value="'+@tag+'"\>' + link\_to\_remote( "doit", :url =\>{ :action =\> :doit }, :with =\> "'abc='+$F('abc')" )
