Lille wrote:
> Actually, the matter is simpler than either of us seemed to
> anticipate: the :confirm helper option just isn't very helpful. In
> other words, all :confirm=>'Are you sure?' does is produce the raw
> html onclick=>"return confirm('Are you sure?')". I had assumed that if
> it were a helper, I should want to use it, not duplicate it, ergo my
> post.
> 
> So, if anyone ever wants to make conditional the :confirm option of
> the link_to/button_to erb function, use :onclick=>"if(...)
> { confirm('whatever text');}" -- involving whatever conditional logic
> you like in the raw javascript.

And what are your plans if the user's browser isn't running
Javascript?  Because in that case they won't ever see your
confirmation.  Progressive Enhancement is better than Graceful
Degradation.

Bob

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to