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

showconfirm fail

1 Answer 40 Views
Window
This is a migrated thread and some comments may be shown as answers.
Luigi
Top achievements
Rank 1
Luigi asked on 11 Sep 2008, 09:18 AM
Hi, hi use the last build prometheus, and the javascript event "showconfirm" fail.
Here my code into tag form on ASPX file

<telerik:RadScriptManager ID="RadScriptManager1" Runat="server" ></telerik:RadScriptManager>
<
telerik:RadWindowManager ID="RadWindowManager1" runat="server" ></telerik:RadWindowManager>

<

script type="text/javascript" language="javascript" >
showconfirm();    // <===== CALL EVENT  ON PAGE LOAD
function confirmCallBackFn(arg)
    {
alert("Confirm returned the following result: ");}
function showconfirm()
    {
radconfirm('Are you sure?', confirmCallBackFn, 330, 100); return false; }
</script>

Help!
tnk's .

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 12 Sep 2008, 10:49 AM
Hi Luigi,

I believe that the following topic in the ASP.NET AJAX documentation will be of help:
http://www.asp.net/AJAX/documentation/live/overview/AJAXClientEvents.aspx

In general, in ASP.NET AJAX environment, the ASP.NET controls (including RadControls for ASP.NET AJAX) are created after the page is loaded - e.g. what happens in your code is that the function is called before the RadWindowManager is rendered on the page.

Here is how to make your code work:

function pageLoad() 
    showconfirm(); // <=====CALL EVENT ON PAGE LOAD  
 
function confirmCallBackFn(arg)  
    alert("Confirm returned the following result: "); 
}  
 
function showconfirm() 
    radconfirm('Are you sure?', confirmCallBackFn,330, 100); return false;  
}  


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Luigi
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or