Thanks Branko. I'll check out jQuery dialog box.

> You can also try to do it like this:
> ...

Did you mean to do this with jQuery?

On Mon, Mar 1, 2010 at 1:32 PM, Branko Vukelic <[email protected]> wrote:
> On Mon, Mar 1, 2010 at 7:44 PM, jlist9 <[email protected]> wrote:
>> This is not strictly a web.py question. I'd like to know if web.py users
>> have any recommended way of implementing simple dialog boxes, for example,
>> confirmation for deletion. One way I can think of is to have a dedicated
>> page/template that shows some text and two buttons, and use hidden fields
>> to indicate delete action and the ID of the object to delete. This will work
>> but it doesn't look very good. A popup dialog box would look much nicer.
>> I suppose this involves an AJAX invocation. Any suggestions/sample
>> code/links/library recommendations?
>
> jQuery UI[1] has a ready to use dialog control.
>
> You can also try to do it like this:
>
> 1. disable default action on the delete button
> 2. make a div and populate it with the form (you can use AJAX call to
> retrieve a pre-styled HTML for this)
> 3. the form in the dialog is fully armed. It has a button called
> "confirm" but it actually does the same thing as the non-AJAX form in
> your regular page
>
> I've never liked popup boxes, though. It's better to simply make
> deletion a little harder to do. For instance, if you have edit and
> delete buttons, put them on opposite sides of the item, so that edit
> is easier to click. Or make deletion a two-step procedure (checkbox +
> click).
>
> [1] http://jqueryui.com/
>
> --
> Branko Vukelić
>
> http://foxbunny.tumblr.com/
> http://www.flickr.com/photos/16889...@n04/
> http://www.twitter.com/foxbunny
> http://github.com/foxbunny
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/webpy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to