dhtmlxWindow and dhtmlxCalendar

Hi,



I’ve been trying to locate an example of how to accomplish the following but haven’t found one…



I have a dhtmlxLayout which contains a grid. Clicking on a cell opens a window. Here’s my problem… Within the window I cannot seem to initiailize a calendar. I get an error message stating that "mCal’ object is undefined. I have all of the calendar initialization (css styles and js) code within the window source HTML file. The object I am creating is “mCal”.



Any ideas would be appreciated…


Hello,


Without any sample it is hard to solve the issue.


Please, provide code snippet relating to window and calendar intialization.

Here is some code snippets…

Main datagrid file:
load all necessary libraries…












<script  src=/dhtmlx/library/codebase/dhtmlxwindows.js">


   

grid populated via XML:
<?xml version="1.0" encoding="UTF-8"?>


<![CDATA[Bxxxxx]]>
Peter John
<![CDATA[pbxxxx]]>
pxxxx@pxxxx.com

Free Trial

01/13/2008
N
N
N



The call to the window is in the above CDATA

The window file called retrieves user data via the uid URL parameter. A table is generated dynamically. There is no loading of the dhtmlxcalendar css or js libraries in this file…




  
  


Date Paid

               




Hello,


In case of using ajax loading mode, the script is not executed.


The edituserinfo.cfm should generate only html structure, but JS code should be defined at the main page:


win.attachURL(“edituserinfo.cfm?uid=”+uid+“&”+r , true);
dhxWins.attachEvent(“onContentLoaded”,initCalendar);


function initCalendar(){
var newCalId = ‘mCal_10572’;
mCal = new dhtmlxCalendarObject(‘mCal_10572’, false);
mCal.setDateFormat(“%m/%d/%Y”);
mCal.setYearsRange(2000,2020);
mCal.winTitle = “Date Paid”;
mCal.draw();
}



Please, see attached sample.




window_ajax.zip (111 KB)