I didn't find that recommended anywhere, I stumbled across it on my
own.  I found that IE was working fine for me on one such application
but when I used the same approach on another almost identical
application I still had memory leakage under IE.  The only difference
was the first app had more than just the Dialog stuff in the doc ready
function -- the HTML page was the same.  It seemed like 'magical
thinking' but since that was the only difference I tried putting the
other (not needed) code in the document ready for the second
application and it worked.  I commented out various parts of the other
code and sometimes the leakage would come back and sometimes it
wouldn't.  I eventually got it down to just keeping in the datepicker
was enough to let it continue to work fine under IE without any memory
leakage.  But I don't understand why this works.

Sean

On Mar 16, 12:31 pm, Fontzter <[email protected]> wrote:
> Hi,
>
> Just wondering...where did you come across that recommendation?  Can
> you paste a url?
>
> Thanks,
>
> Dave
>
> On Mar 16, 2:14 pm, Sean McKenna <[email protected]> wrote:
>
> > I have a large table with many radio buttons.  A double click on a
> > radio button brings up a UI Dialog with data obtained from the server
> > through a AJAX call.  Running this with IE6 or IE7 showed a big memory
> > use increase with every dialog box, which made the app not usable.
> > The Dialog was the only JS used on the page so the code looked like
> > this:
>
> > $(document).ready(function () {
>
> >     // Set up the div for the dialog box on radio button
> > click
> >     $("#mess").dialog({ autoOpen: false, title: 'Case Details', modal:
> > true,
> >                           closeOnEscape: true, bgiframe: true, resizable:
> > false});
>
> >     // in the matrix dayview get case details if double click on radio
> > button
> >     $("table.mvday input:radio").dblclick(function () {
> >         $.ajax({
> >             type: "GET",
> >             cache: false,
> >             url: "mmdo2_jfunc.cgi",
> >             data: "casedet=1&thecase=" + $(this).val() +
> >                "&calendar=" + $("input:[name=calendar]").val() +
> >                "&session_file=" + $("input:[name=session_file]").val
> > (),
> >             success: function (msg) {
> >                 $("#mess").html(msg).dialog("open");
> >             }
> >         });
> >   });
>
> > });
>
> > In looking for a solution I stumbled across the fact that if I
> > included another JQUI section in the script, even if it is not used,
> > the memory leak in IE no longer occured.  So the following works fine
> > in IE6 and IE7 without leaking memory, but WHY?
>
> > $(document).ready(function () {
>
> >     // Set up the div for the dialog box on radio button
> > click
> >     $("#mess").dialog({ autoOpen: false, title: 'Case Details', modal:
> > true,
> >                           closeOnEscape: true, bgiframe: true, resizable:
> > false});
>
> >     // in the matrix dayview get case details if double click on radio
> > button
> >     $("table.mvday input:radio").dblclick(function () {
> >         $.ajax({
> >             type: "GET",
> >             cache: false,
> >             url: "mmdo2_jfunc.cgi",
> >             data: "casedet=1&thecase=" + $(this).val() +
> >                "&calendar=" + $("input:[name=calendar]").val() +
> >                "&session_file=" + $("input:[name=session_file]").val
> > (),
> >             success: function (msg) {
> >                 $("#mess").html(msg).dialog("open");
> >             }
> >         });
>
> >     });
>
> >     // set up a date picker -- even if you aren't using it needed for
> > ie memory management???
> >     // here is a good bit of learning -- IE can't handle a trailing
> > comma in the param list
> >     $('#dummy').datepicker({dateFormat: 'yy-mm-dd', showOn: 'both',
> >                       buttonImage: '../Calendar_art2/calendar.png',
> >                       buttonImageOnly: true,
> >                       changeMonth: true, changeYear: true
> >                    //   minDate: new Date(2009, 3 -1, 15)
> >     });
>
> > });
--~--~---------~--~----~------------~-------~--~----~
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