Hi,
I need to "popup" a message to the user in order he can choose an
option. It is not a YES-NO option but almost the same (has has to choose
among two options). It has to be a message with a question and two
buttons.
Is that possible on Rails?
Thanks!
Jorge
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/94315db2c7c6c205355f23d367cf1e82%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
I believe the standard way to do this would be to show a previously hidden div containing a form. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d892b8fb0764b2685155dbae7330f071%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Joel Pearson wrote in post #1120757:> I believe the standard way to do this would be to show a previously > hidden div containing a form.And that is possible using Rails or is it Javascript? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/04c28d9a2ee2a59cb2c415eb9dab5b4d%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
You would show and hide the element with JavaScript, but create it in Rails.
Simple example:
<div id="favorite-color" style="display:none">
<%= form_for @knight do |f| %>
<%= f.label :favorite_color, ''What\''s your favorite
color?'' %>
<%= f.collection_select :favorite_color, %w(red green blue aaaaah), :to_s,
:titleize, :prompt => true %>
<%= f.submit %>
</div>
<button id="color-button">Take the challenge!</button>
//script
$(''color-button'').observe(''click'',
function(){
$(''favorite-color'').show();
});
Walter
On Sep 5, 2013, at 9:35 AM, Jorge C. wrote:
> Joel Pearson wrote in post #1120757:
>> I believe the standard way to do this would be to show a previously
>> hidden div containing a form.
>
> And that is possible using Rails or is it Javascript?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/04c28d9a2ee2a59cb2c415eb9dab5b4d%40ruby-forum.com.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/A89FD321-5C52-4C37-AA7C-43FF172CDED0%40wdstudio.com.
For more options, visit https://groups.google.com/groups/opt_out.