I found my issue.  Maybe i didn't describe it well enough beforehand,
but I'm generating dialog's on the fly because i have a large list of
item's that i could potentially open from a page.  I was destroying
the dialog after i closed each one.  This wasn't working with just
destroy because it was still leaving my dialog div on the page and i
ended up appending remove to the destroy call and my issues were gone.
Below is what i did to my destroy call.

$(this).dialog('destroy').remove();

Thanks though.

On May 1, 10:34 am, Fontzter <[email protected]> wrote:
> You need to have a full page of html code in the html page.  It comes
> preloaded with that way.  You can add the libraries by using the drop-
> down in the header.  I did this for you:http://jsbin.com/ufofe/edit
>
> Looking at your code, you seem to be initializing the dialog multiple
> times (when a link is clicked) by calling the function
> openLinkDialog.  The code in that function initializes the dialog and
> should only be called once.  Then use .dialog("open") and .dialog
> ("close") to open/close the dialog.  You should likely call your
> openLinkDialog function once when the document loads and set autoOpen
> to false.  Then just open and close it with the links.
>
> Hth,
>
> Dave
>
> On May 1, 10:09 am, Travis <[email protected]> wrote:
>
> > Here is a static example.  I'm unsure why the JS doesn't work for me
> > on that site(not familiar with jsbin, but very cool/useful). Doesn't
> > seem to see the JS code. Even though it doesn't work on there, you can
> > see what I'm trying to do. Feel free to fix if you know how.
>
> >http://jsbin.com/araze/edit
>
> > And to reiterate, if i click to the edit button for an item, then
> > cancel, then click to edit the item again, edit info and perform a
> > $.post, the serialized form sent will submit the original information
> > and not the new info i entered.  If i would have submitted info the
> > first time i opened the dialog, i can retrieve the new info from the
> > form just fine.  It is a Coldfusion application just to note.
>
> > Thanks,
> > Travis
>
> > On May 1, 7:03 am, "Richard D. Worth" <[email protected]> wrote:
>
> > > Unfortunately, the code you've shared below is not enough to see where the
> > > problem is. Could you reproduce a simple test page here:
>
> > >http://jsbin.com/
>
> > > Thanks.
>
> > > - Richard
>
> > > On Wed, Apr 29, 2009 at 5:23 PM, Travis <[email protected]> wrote:
>
> > > > I utilize a form inside a dialog to insert and update data about
> > > > objects.  Below is the code i use to open the dialog. If I open the
> > > > dialog and submit the form, all data fields entered are read
> > > > successfully and submitted without a problem.  If i open the dialog,
> > > > then cancel or x out of the dialog, then open it a second time and
> > > > submit my form, the new inputs i entered aren't being read, instead it
> > > > reads whatever the value of the inputs were on the first load.  Any
> > > > help is appreciated.
>
> > > > $(document).ready(function(){
> > > >         $('#editUrlLink').click(function() {
> > > >                         $("#linkDialog").dialog('open');
> > > >                 });
> > > > });
>
> > > > function openLinkDialog()
> > > > {
> > > >        $("#linkDialog").dialog({
> > > >                bgiframe: true,
> > > >                autoOpen: true,
> > > >                height: 350,
> > > >                width: 475,
> > > >                modal: true,
> > > >                buttons: {
> > > >                        'Submit': function() {
>
> > > >  $.post('submit.cfm',$("#editLinkForm").serialize(),function
> > > > (data,status){
> > > >                                        window.location.reload();
> > > >                                });
> > > >                                $(this).dialog('close');
> > > >                        }, //end upload button
> > > >                        Cancel: function() {
> > > >                                $(this).dialog('close');
> > > >                        }
> > > >                },//end buttons
> > > >                close: function() {
> > > >                         $(this).dialog('destroy');
> > > >                }
> > > >        });
> > > > }
>
>
--~--~---------~--~----~------------~-------~--~----~
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