I am using daypilot modal with
var modal = new DayPilot.Modal();
modal.useIframe = false;
Any idea why is it not calling.
If you use the modal dialog to display a custom URL using showUrl() it will always use an iframe. The "useIframe" value is ignored in this case.
If you want to reach the JS objects created in the parent page you need to use "parent" object instead of "window". E.g. if there is a "dp" object in the main page you can reach it as "parent.dp" from within the modal page.
Let me know if this is not what you are looking for.