What are you calling useful data?  If you are wanting some sort of ID
then pass that into the dialog constructor and then parse it when you
are wanting to actually delete the "whatever".  Make the "ok" button a
link to a "static" link that will take care of deleting the item (ie /
item/delete/?id=123) but the actual button makes an ajax call to the
same URL and if successful it closes the dialog.

Hope that helps/makes sense.  Let me know if it doesn't and I'll try
to help.

On Feb 2, 6:09 pm, Bennie <[email protected]> wrote:
> Thanks! I can do that. I'd still like to know if there's a way to get
> at useful data from within the callbacks.
>
> On Feb 2, 4:01 pm, ScottJehl <[email protected]> wrote:
>
> > Oops should be...
>
> > var li = $(this);
>
> > On Feb 2, 6:53 pm, ScottJehl <[email protected]> wrote:
>
> > > hmm how about...
>
> > > $("#portfolio ul li").click(function() {
> > >         var li = $(that);
> > >         $("#example").dialog({
> > >                 modal: true,
> > >                 buttons: {
> > >                         "Don't Remove": function() {
> > >                                         $(this).dialog('close');
> > >                         },
> > >                         "Remove": function() {
> > >                                         li.remove();
> > >                                         $(this).dialog('close');
> > >                         }
> > >         });
>
> > > });

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" 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/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to