Hi,

I am using a web framework that allows me to use ajax to pull in js/
html into a div without refreshing the whole page so I am  often
bringing in this snippet below:

<script type="text/javascript">
        $.ui.dialog.defaults.bgiframe = true;
        $(function() {
            $("#summaryDialog").dialog({ draggable: true, resizable:
false, autoOpen: false, height: 400, width: 800 });
        });

    </script>

    <div id="summaryDialog" title="Summary">
        <span wicket:id="label"></span>
    </div>

(Don't worry about the wicket:id, that span gets filled in on the
server).

Here's my problem:
1) a user clicks on a link to open the dialog, this causes the above
snippet to come into the source HTML and a dialog opens up using $
("#summaryDialog").dialog('open')-- so far so good

2) A user closes the dialog by clicking on the corner left or a cancel
button which does $("#summaryDialog").dialog('close') -- also so far
so good

3) User clicks on another application link which uses AJAX to bring
the snippet above in again. This time it doesn't work because in the
rendered source I have essentially two of the jquery UI boxes with the
same Id's

<div aria-labelledby.... id="summaryDialog">
   <span id="label1e2">My Summary</span>
</div></div>
<div aria-labelledby ... id="summaryDialog">
   <span id="label1e2">My New Summary</span>
</div></div>

So the problem is how can I tell jquery to "clean up its mess" i.e.
the rendered DOM above when a close is performed on the dialog...

Thanks, Jason



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to