jQuery Dialog - Remote Page Javascript not running in FF / Chrome
Posted
by Robert
on Stack Overflow
See other posts from Stack Overflow
or by Robert
Published on 2010-05-26T17:58:37Z
Indexed on
2010/05/26
18:01 UTC
Read the original article
Hit count: 284
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>
© Stack Overflow or respective owner