I''m using link_to_remote to call a method that deletes an item
<%= link_to_remote " [delete]", :url => { :controller =>
''user_admin'',
:action =>
''employee_type_delete'',
:id => employee_type.id
} %>
I''d like to have a confirm dialog popup like the plain old link_to
call allows. Is there any way to do this with link_to_remote?
--
Sterling Anderson
sterling.anderson [at] gmail.com
http://sterlinganderson.net/
yep
just use the :confirm option
link_to_remote "delete", :url => {...}, :confirm => "Are
you sure?"
On 8/17/06, Sterling Anderson <sterling.anderson@gmail.com>
wrote:> I''m using link_to_remote to call a method that deletes an item
>
> <%= link_to_remote " [delete]", :url => { :controller =>
''user_admin'',
> :action =>
''employee_type_delete'',
> :id => employee_type.id
> } %>
>
> I''d like to have a confirm dialog popup like the plain old link_to
> call allows. Is there any way to do this with link_to_remote?
>
>
> --
> Sterling Anderson
> sterling.anderson [at] gmail.com
> http://sterlinganderson.net/
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
I''m trying to get some ajax stars on my website to update. The CSS
code
I have in place expects to put URL''s like this:
<ol class=''star-rating''>
<li><a href=''../vote/1?store=212''
title=''Terrible''
class=''one-star''>1</a></li>
<li><a href=''#'' title=''Poor''
class=''two-stars''>2</a></li>
<li><a href=''#'' title=''Fair''
class=''three-stars''>3</a></li>
<li><a href=''#'' title=''Good''
class=''four-stars''>4</a></li>
<li><a href=''#'' title=''Superb''
class=''five-stars''>5</a></li>
</ol>
I''m trying to use link_to_remote to do the above:
<div id="stars">
<ol class=''star-rating''>
<li><%= link_to_remote ("", :update =>
"stars", :url =>{ :action =>
:vote, :id => 1, :store => @store.id}, :class =>
''one-star'', :name =>
''Terrible'') %></li>
</ol>
</div>
I have one link_to_remote for each of my star classes but it doesn''t
seem to work. Can anyone help me understand what I''m doing wrong?
--
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 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
-~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- form_tag broken in Rails 1.2 RC2 or is it me?
- Strange 500 Error with namespace::controller#action appearing in reload only
- [PATCH 1/1] staging: hv: Add support for >2 TB LUN in storage driver.
- [PATCH 1/1] staging: hv: Add support for >2 TB LUN in storage driver.
- quick q on script/generate scaffold