Re: [Rails] Re: :confirm dont work
Ok you have pretty much everything and the kitchen sink in there. This
is what *might* be happening. I have found that jquery and prototype
conflict and have had to handle this with my own code. Well for us
jquery and prototype were conflicting, it could be for you as well.
// We are using jQuery which does not support the :confirm => '...'
option of the
// link_to and button_to tags. However if we also load the prototype js library
// things seem to go wrong with the existing js code so we have to handle this
function delete_record(message) {
var r = confirm("Do you want to delete " + message + "?");
return r;
}
and you use it with
<%= link_to 'Delete this race', race_delete_url(:id => race.id),
:onclick => "return delete_record(\"#{race.display_name}\");" %>
This should at least get you out of the hole. However mixing
javascript libraries is not a good idea.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home