[Lift] Re: Deleting elements after a modal confirmation dialog
Thank you both for your reply but I have to admit that it was an error in my javascript that was preventing my code from working. Apologies for wasting your time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Deleting elements after a modal confirmation dialog
Well it depends on how your dialog works... if you need a JS function that calls back to the server, use SHtml.ajaxInvoke. If you want a button element that does the same thing, use SHtml.ajaxButton. If that doesn't help you, please post what code you do have or an example of what you want. -Ross On Aug 29, 2009, at 5:23 PM, Channing Walton wrote: I'm a bit stumped as to how to proceed with the following. I have a page which shows a list of items, each of which can be deleted. When the user clicks the delete button next to an item, I would like to open a confirmation dialog and if they confirm, call a backend function to delete the corresponding object, and then delete the item's row in the list. I have managed to integrate the modal confirmation example shown here: http://demo.liftweb.com/rhodeisland Everything works except I cannot figure out how to call some javascript when the user clicks the 'yes' button to update the list. Help and pointers much appreciated, I really am stumped. Channing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Deleting elements after a modal confirmation dialog
In such cases IF you also need to send an ajax request you can also use the SHtml.ajaxButton that takes a Call as an argument. See this thread: http://groups.google.com/group/liftweb/browse_thread/thread/f7a5eb09a756e076/009d5802f7652669?hl=enlnk=gstq=Call#009d5802f7652669 Br's, Marius On Aug 30, 12:31 am, Ross Mellgren dri...@gmail.com wrote: Well it depends on how your dialog works... if you need a JS function that calls back to the server, use SHtml.ajaxInvoke. If you want a button element that does the same thing, use SHtml.ajaxButton. If that doesn't help you, please post what code you do have or an example of what you want. -Ross On Aug 29, 2009, at 5:23 PM, Channing Walton wrote: I'm a bit stumped as to how to proceed with the following. I have a page which shows a list of items, each of which can be deleted. When the user clicks the delete button next to an item, I would like to open a confirmation dialog and if they confirm, call a backend function to delete the corresponding object, and then delete the item's row in the list. I have managed to integrate the modal confirmation example shown here: http://demo.liftweb.com/rhodeisland Everything works except I cannot figure out how to call some javascript when the user clicks the 'yes' button to update the list. Help and pointers much appreciated, I really am stumped. Channing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---