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
-~----------~----~----~----~------~----~------~--~---