Forum: Ruby on Rails A question about text_field_tag value

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.
Zhao Y. (Guest)
on 2008-12-18 03:47
This is my rails code:

<%= label_tag 'user_name_label', 'User Name:' %>
<%= text_field_tag 'user_name', ''%>

<%= label_tag 'view_name_label', 'View Name:'%>
<%= text_field_tag 'view_name', '' %>

I defined a user name text field and a view name text field. The view
name text field is based on the user name text field value. So I need to
add a function to listen to the user input on user name text field and
whenever the value changed, it should change the view name text field
accordingly. How can I set the listen function?

thanks

Zhao Yi
This topic is locked and can not be replied to.