The following piece of code produce a javascript error"
The error is in the bold line, and the msg is:"Microsoft JScript runtime error: 'undefined' is null or not an object"
It is related to popUpRadMsg. I call it on this way:
.
.script goes under the </html>:
.
...
and on an attached JS file:
This alert is invoked depending on the visibility of divDisplayMsg. this is set on the server side and allow me to control the popup msg (I can send text and info from server side to it).
Maybe you can tell why is this javascript error occurs?
(IE7, IE6, FF)
Type.registerNamespace("Telerik.Web.UI"); |
Type.registerNamespace("Telerik.Web.UI.WindowManager"); |
function GetRadWindowManager(){ |
return Telerik.Web.UI.WindowManager.Manager; |
} |
window.radalert=function(_1,_2,_3,_4){ |
var _5=GetRadWindowManager(); |
var _6=_5._getStandardPopup("alert",_1); |
if(typeof (_4)!="undefined"){ |
The error is in the bold line, and the msg is:"Microsoft JScript runtime error: 'undefined' is null or not an object"
It is related to popUpRadMsg. I call it on this way:
<body onload="msgAlert()"> </html> |
.script goes under the </html>:
.
...
<script language="javascript" type="text/javascript"> |
// This code must be in the master and cannot be moved to external js file. |
// We use String comparsion instead of boolean, to keep the code valid. |
// if (Convert.ToString(divDisplayMsg.Visible)).ToLower() is accidently empty, no harm is done and the code is still valid. |
function msgAlert() { |
var toPopup = "<%=(Convert.ToString(divIsDisplayMsgVisible.Visible)).ToLower() %>"; |
if (toPopup == "true") { |
var displayMsgDiv = document.getElementById("<%=divDisplayMsg.ClientID %>"); |
if (displayMsgDiv) { |
var msg = displayMsgDiv.innerHTML; |
//alert(msg); |
popupRadMsg(msg); |
} |
//popupDisplayMsg(); |
} |
} |
</script> |
and on an attached JS file:
function popupRadMsg(msg){ |
return radalert(msg, 500, 500); |
} |
This alert is invoked depending on the visibility of divDisplayMsg. this is set on the server side and allow me to control the popup msg (I can send text and info from server side to it).
Maybe you can tell why is this javascript error occurs?
(IE7, IE6, FF)