Thanks, I'm working on it.

It seems, after reading the Lift book, since we have 'Alert' in the
list of basic JsCmds in Table 8.2, a companion 'Confirm' (and perhaps
even 'Prompt') command would be logical to have, since these are basic
and popular user interface elements.


On Jun 16, 6:46 am, Magnus Alvestad <magnus.alves...@gmail.com> wrote:
> > As I move deeper into learning Lift, I now want to start deleting
> > Mapper records in the ToDo example.
>
> Here's how I did it (based on suggestions in this group, I think):
>
> bind ( "question", html,
>   "text" -> ..,
>   "delete" -> ajaxButton(Text("Remove"),
>       Call("dialog", Str("Do you want to delete the question?")),
>       () => {q.delete_!; S.notice( "Deleted the question!"); reDraw
> ()})
> )
>
> .. and then in the template (default.html) ..
>
> <script type="javascript">
>
> function dialog(text, theCall) {
>   if (confirm(text)) theCall();
>
> }
>
> </script>
>
> -Magnus

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to