I'm trying to load a jsp-file into a jQuery UI dialog http://jqueryui.com/demos/dialog/. The jsp contains a fullCalendar http://arshaw.com/fullcalendar/ calendar. The console calls for calLoader.jsp which more or less only contains:
<jsp:include page="../cal.jsp"/>
When I open the dialog the first time, everything works just fine, but after I close the dialog and try to open it again, I get the following stacktrace from Chrome:
Uncaught RangeError: Maximum call stack size exceeded
d.d.extend._Deferred.f.resolveWith
d.d.extend._Deferred.f.done
d.d.fn.d.ready
d.d.fn.d.init
d.d
(anonymous function)
d.d.extend.globalEval
ba
d.d.extend.each
d.fn.extend.domManip
d.fn.extend.append
d.fn.extend.html
d.fn.extend.load.d.ajax.complete
d.d.extend._Deferred.f.resolveWith
v
d.support.ajax.d.ajaxTransport.send.c
The problem is the same in firefox but I get the message:
too much recursion
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
I realize that I'm trying to load the same stuff more than one and that it somehow needs to be either reused or unloaded/removed and reloaded, but I have no clue how to do that.
This is the code I use to open the calendar (was requested).
function openCalendar() {
var dialog = jQuery('<div id="calendaropener"></div>')
.dialog({
autoOpen: false,
draggable: true,
modal: false,
resizable: false,
width: 820,
height: 750,
position: [50, 50],
title: 'Kalender',
close: function(ev, ui) { calendarObj = null; }
});
dialog.load("calLoader.jsp");
dialog.dialog('open');
}
The function openCalendar() is called from a button on my page. Thanks!