I am calling CloseModalWindow from a page I opened with an OpenModelWindow JScript call:
When I do, the Window closes, but I get a JavaScript error in the JScript.js file:Code:ClientScript.RegisterClientScriptBlock(cstype, Guid.NewGuid().ToString(), _ "$(document).ready(function() {CloseModelWindow();});", True)
"Microsoft JScript runtime error: 'Date' is undefined." in the now function:
Which is causing my onclose event from the calling page not to fire, so my grid isn't being refreshed. Any thoughts on why it wouldn't recognize date? Hell I'm not even sure why the now(); function is called.Code:function now() { return (new Date).getTime(); }
Code:$("#faddbtn").click(function (e) { var url = "addevent.aspx"; OpenModelWindow(url, { width: 600, height: 425, caption: "Schedule Event", onclose: function (e) { $("#gridcontainer").reload(); } }); });


Reply With Quote