This is a migrated thread and some comments may be shown as answers.

'Null' Appears in title of radwindow

1 Answer 48 Views
Window
This is a migrated thread and some comments may be shown as answers.
stuart
Top achievements
Rank 1
stuart asked on 23 Sep 2008, 09:54 AM

Hi All,

I am using the latest version of ASP.NET AJAX controls and have encountered an error when trying to display a confirmation box.

The title bar of the confirm box is set to 'null'

The script i use is:

  <script type = "">  
 
//Replace old radconfirm with a changed version.   
 
var oldConfirm = radconfirm;   
 
 
window.radconfirm = function(text, mozEvent)   
 
{   
 
var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually   
 
//Cancel the event   
 
ev.cancelBubble = true;   
 
ev.returnValue = false;   
 
if (ev.stopPropagation) ev.stopPropagation();   
 
if (ev.preventDefault) ev.preventDefault();   
 
 
//Determine who is the caller   
 
var callerObj = ev.srcElement ? ev.srcElement : ev.target;   
 
 
//Call the original radconfirm and pass it all necessary parameters   
 
if (callerObj)   
 
{   
 
//Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.   
 
var callBackFn = function (arg)   
 
{   
 
if (arg)   
 
{   
 
callerObj["onclick"] = "";   
 
if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz   
 
else if (callerObj.tagName == "A"//We assume it is a link button!   
 
{   
 
try   
 
{   
 
eval(callerObj.href)   
 
}   
 
catch(e){}   
 
}   
 
}   
 
}   
 
oldConfirm(text, callBackFn, 300, 100, nullnull);   
 
}   
 
return false;   
 
}   
 
</script> 

Along with this behind the button in the ASPX page

asp:Button ID="btnUpdate" runat="server" Text="Create" Font-Names="Verdana" Font-Size="9pt" onclientclick="radconfirm('Are you sure?', event, 330, 100); " />

I have tried numerous ways to change the title from 'null' but can not get my head around it.

Many Thanks
Stuart



1 Answer, 1 is accepted

Sort by
0
stuart
Top achievements
Rank 1
answered on 23 Sep 2008, 10:10 AM
After persisting with my edits to the javascript.

This is now sorted
Tags
Window
Asked by
stuart
Top achievements
Rank 1
Answers by
stuart
Top achievements
Rank 1
Share this question
or