How can I create a fancybox confirmation window for ajax delete Rails 3

I would like Fancybox to confirm messages before the user removes something.

I am NOOB, so I'm not sure how to stop the ajax request to remove something, stop and wait for the user to click confirm in the fancybox modal window.

Can someone point me in the right direction?

thanks

I am using Rails 3 and Ruby 1.9.2.

+4
source share
1 answer

This script looks like a concise and easy way to get to where you are going.

From what I see, you have to run the script before you delete something, so do not try to stop the request and wait for the user.

For example, when a user clicks a button, you do not delete anything until the confirmation button is checked. This way you make fewer requests (faster load times), and you save yourself some coding.

+1
source

All Articles