Matt Carlson
2009-Mar-10 19:51 UTC
[Facebooker-talk] link_to_remote with conditional Dialog.DIALOG_POP?
I''m trying to get a conditional Dialog.DIALOG_POP working for some link_to_remote delete functionality (much like deleting comments on a Facebook profile), but thus far can''t quite get it to work using a Rails helper. Returning true in a Dialog onconfirm call back works fine and the Ajax function gets execute. However, if the user selects the Dialog cancel button, I''m not sure how to handle skipping the delete invocation. Returning false in the dialog prevents it from closing. And I thus far haven''t been able to get a condition argument in link_to_remote working like the following: :condition => ''if (Status.delete() == true)'', Has anyone got this working or is there a better way to approach this? I''m not a Javascript expert, so my apologies if I''m missing something obvious. Cheers, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090310/fafb8424/attachment.html>