Forum: Ruby on Rails pass text_field to controller when using periodically_call_r

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ritzcoder (Guest)
on 2006-05-19 09:57
Hi.  Can anyone help with this?  In a view, I have a text_field_tag(
:mytextfield ).  I would like to pass the current value of that
text_field_tag to a periodically_call_remote  - something like
periodically_call_remote( :url => { :action => :do_it, :thetextval =>
:mytextfield.value } ) - Any idea how can I pass and/or access the value
of the text_field_tag in my do_it controller?  Obviously the :thetextval
=> :mytextfield.value does not work.  I checked the :params on the do_it
controller but :mytextfield is not in there.  However, I can easily pass
hardcoded values using :thetextval => 5.  Then I can get the value of 5.
However, I don't know how to get the value from a text_field passed.
Thanks for any help.
Mark Reginald J. (Guest)
on 2006-05-20 15:46
(Received via mailing list)
ritzcoder wrote:
> Thanks for any help.
Add the option

   :with => "'thetextval=' + $F('mytextfield')"

to your periodically_call_remote call.

--
We develop, watch us RoR, in numbers too big to ignore.
This topic is locked and can not be replied to.