Hi.
I have a simple question. Looks like it''s something basic.
I have 2 elements: a form with a textfield and a link (father), and a
panel with a link that includes a value inside (child). Here''s how my
analogy works:
- First you click on the link of the "father" to make the
"child"
appear (with an "Effect.Appear" command).
- Then you click on the link, and two processes are done here:
> The value is passed to the textfield.
> The "child" dissapears (with an "Effect.Fade" command)
To tell you the truth, I have made and example code of the view
(without the value transfer to the textfield):
#index.html.erb:
<% form_tag :action => ''access'' do %>
<p><label for="user_username">Username</label>:
<%= text_field ''user'', ''username''
%></p>
<p><label for="user_passwordkey">Password</label>:
<%= text_field ''user'', ''passwordkey''
%></p>
<%= submit_tag "Enter" %>
<% end %>
<p id="search_link"><%= link_to_function("User
missing?",
"Effect.Appear(''search''); return false;")
%></p>
<div id="search" style="display:none;">
<p>User search:</p>
<p><%= link_to_function("My User",
"Effect.Fade(''search''); return false;")
%></p>
</div>
Can you tell me what''s missing or wrong? I would like to know, because
I''m beginning with Rails 2.1. I know it can be done on standard HTML
and Javascript. So I want to do it on Rails.
BTW, I''m using scrpit.aculo.us for this example to make it feel alive!
Greetings...
The Neurochild.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---