Please use this definition of the ajax button: def ajaxButton(text: NodeSeq, jsFunc: Call, func: () => JsCmd, attrs: (String, String)*): Elem
I described the functionality here: http://groups.google.com/group/liftweb/browse_thread/thread/ec573c0e3052a862/038920885900c7d6?lnk=gst&q=ajaxButton#038920885900c7d6 .. see the last post. Let me know if you have further questions. Br's, Marius On Oct 25, 1:24 pm, "Neil.Lv" <anim...@gmail.com> wrote: > Hi all, > > I use the ajaxButton to delete the record from the database, and How > can the ajaxButton surpport > > the confirm dialog when clicking the delete button(ajaxButton) ? > > 1:) > I use this method that it will be show the confirm dialog when > clicking the delete button, but it never call the deleteItemFromDb() > method. > ### > ajaxButton(S.?("delete"), Call("confirm", Str("are you sure?")), () => > {deleteItemFromDb(); reDraw()}) > ### > > 2:) > When clicking the delete button, the record will be deleted from > the db, but it doesn't show the > confrim dialog (the js confirm dialog) . > ### > ajaxButton(S.?("delete"), () => {deleteItemFromDb(); reDraw();}) > > Thanks for any suggestion ! > > Cheers, > Neil > > ### --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---