jQuery Dialog - Remote Page Javascript not running in FF / Chrome
- by Robert
Hey SO,
I've created a page intended only to be opened via modal. This page contains a calendar of the User's favorite events...etc.
I'm using the jQuery Dialog and FullCalendar plugins to do this.
In IE, there is not issue...everything works fine. However, the Javascript on the remote page (Calendar.aspx) is never getting executed in FF or Chrome.
Here's my code.
SomeRandomPage.aspx
$("#showcalendar").click(function() {
var dialog = $('<div style="display:hidden"></div>').appendTo('body');
// load remote content
dialog.load("Calendar.aspx", {}, function(responseText, textStatus, XMLHttpRequest) {
dialog.dialog(
{
modal: true,
width: 750,
resizable: false,
draggable: false,
title: "My Calendar",
closeOnEscape: false,
close: function(event, ui) {
$(this).remove();
}
}
);
});
});
}
Calendar.aspx
<!-- Necessary js above -->
<div id="calendar"></div>
<script>
$(document).ready(function() {
alert("HERE"); //Doesn't work in FF or Chrome. Works in IE
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month'
},
editable: false,
events: '/webservices/CalendarEvents.ashx'
});
});
</script>