This is a tricky one so I'll be as informative as I can. I have FullCalendar.js running as a JS calendar plugin on an external page "calendar_summary.cfm" which is called as part of a series of other pages which reload over various periods of time on a singular page. This calendar summary page has data which is called via ColdFusion into a JS object to feed the data into FullCalendar.js. The results of that are carried over AJAX to appear in a DIV on the main page (which we will call "main_page.cfm").

Problem is, the calendar call doesn't always fire all the time when "calendar_summary.cfm" is called, resulting in a blank space within the "calendar" DIV within the now populated "content2" DIV of "main_page.cfm", other times, the $("#calendar").fullCalendar() call fires showing a lovely calendar. Any ideas where I may be going wrong? Code below:

From the main_page.cfm (ColdFusion/JS/jQuery):

function jsAjax(theUrl,theClass) {
        url: theUrl,
        context: document.body,
        success: function(responseText) {
            $("."+theClass).find("script").each(function(i) {

function ajax(){
        xmlHttp=new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
        return xmlHttp;
    catch (e){
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
            return xmlHttp;
        catch (e){
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
                return xmlHttp;
            catch (e){
                alert("Your browser does not support AJAX.");
                return false;

function fetch_unix_timestamp()
    return parseInt(new Date().getTime().toString().substring(0, 10));
function ref_kr_status(){
    var divid = "content2";
    var url = "calendar_summary.cfm";

    var xml3 = ajax();
    var timestamp = fetch_unix_timestamp();
    var nocacheurl = url+"?t="+timestamp;


window.onload = function startrefresh(){
<div class="content2" id="content2"></div>
<script type="text/javascript">
From "calendar_summary.cfm" (also ColdFusion/JS/jQuery)

<table width="100%" cellpadding="0" cellspacing="0">
    <tr style="color: white; background: -moz-linear-gradient(top, rgba(0,88,138,1) 0%, rgba(0,60,94,1) 50%, rgba(0,88,138,1) 100%);"><th colspan="5">Calendar for #DateFormat(Now(),"mmmm, yyyy")#</th></tr><tr><td><cfquery name="qJobs" datasource="kxxxxs">SELECT j.*, IFNULL(c.color_hex, 'FF00FF') AS color_hex, s.job_status_desc as status
        FROM jobs j
        LEFT OUTER JOIN installers i
            ON i.installer_id = j.job_installer
        LEFT OUTER JOIN colors c
            ON c.color_id = i.installer_color
        LEFT OUTER JOIN job_status s
            ON s.job_status_id = j.job_status
        WHERE j.job_install_date_start IS NOT NULL
        AND j.job_install_date_end IS NOT NULL
        AND j.job_active = 1
<cfsavecontent variable="theCal">
    var date = new Date();
    var d = date.getDate();
    var m = date.getMonth();
    var y = date.getFullYear();
    while ($("##calendar").html()==""){
            {height: 400, 
            header: {left: "",center: " ",right: ""},
            editable: false,
            events: [
            <cfloop query="qJobs">
                <cfset dateStart = qJobs.job_install_date_start />
                    <cfset dateEnd = qJobs.job_install_date_end />
                    <cfcatch type="any">
                        <cfset dateEnd = qJobs.job_install_date_start />
                <cfset _year1 = Year(dateStart) />
                <cfset _month1 = Month(dateStart) />
                <cfset _day1 = Day(dateStart) />
                <cfset _hour1 = Hour(dateStart) />
                <cfset _minute1 = Minute(dateStart) />
                <cfset _year2 = Year(dateEnd) />
                <cfset _month2 = Month(dateEnd) />
                <cfset _day2 = Day(dateEnd) />
                <cfset _hour2 = Hour(dateEnd) />
                <cfset _minute2 = Minute(dateEnd) />
                <cfset backgroundColorText = 'backgroundColor: "###qJobs.color_hex#",' />
                <cfset titleText = 'title: "#qJobs.job_name#",' />
                {id: "#qJobs.job_id#", 
                    start: new Date(#_year1#, #(_month1-1)#, #_day1#, #_hour1#, #_minute1#),
                    end: new Date(#_year2#, #(_month2-1)#, #_day2#, #_hour2#, #_minute2#),
                    allDay: <cfif (DateDiff("s", dateEnd, dateStart) GE 86400)>true<cfelse>false</cfif>,
                    <cfif job_completed EQ 0>#backgroundColorText#<cfelse>backgroundColor: "##999999",</cfif>
                    borderColor: "##000000",
                    textColor: "##ffffff"}
                    <cfif qJobs.CurrentRow NEQ qJobs.RecordCount>,</cfif>

<table style="width: 725px; font-size: 12px !important;">
    <tr style="width: 100%;">
            <div id="calendar"></div>
<script type='text/javascript' id="doThat">

Any ideas what I'm missing that's resulting in that calendar function to not fire every so often? I know the ColdFusion works... The Ajax, JS and jQuery... I'm not so sure of which may be acting up...

Many thanks in advance...

~ Fib Jones