radconfirm callback funtion not found

3 posts, 1 answers
  1. Andy
    Andy avatar
    31 posts
    Member since:
    Nov 2010

    Posted 03 Aug 2018 Link to this post

    I have been struggling to get the callback function to be recognized.  My situation is that I have a javascript function that executes when a user clicks a button.  This function contains code similar to the following to open the radconfirm prompt window

     var oManager = GetRadWindowManager();
        oManager.radconfirm(pMsg, "returnFunction",400,300,"Popup Title");


    When the user clickes either the Ok or Cancel button the following error occurs.

    JavaScript runtime error: Function expected


    The function returnFunction(arg) exsits in the same javascript file but is not recognized.

    Any ideas as to the issue.


  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    4713 posts

    Posted 06 Aug 2018 Link to this post

    Hello Andy,

    When called from JavaScript, the radconfirm() method takes a function object for the callback function. It takes a string when called from the code-behind. Reference to the full functionality of the widget: https://docs.telerik.com/devtools/aspnet-ajax/controls/window/alert,-confirm,-prompt-dialogs/radconfirm-dialog.

    Here's an example:

    <script type="text/javascript">
        function confirmCallBackFn(arg) {
            radalert("Confirm returned the following result: " + arg);
        function callRadConfirm() {
            radconfirm('Are you sure?', confirmCallBackFn); //no quotes around the callback function object reference
    <asp:Button Text="call RadConfirm" ID="Button1" OnClientClick="callRadConfirm(); return false;" runat="server" />
    <telerik:RadWindowManager runat="server" ID="rwm1" RenderMode="Lightweight"></telerik:RadWindowManager>

    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Andy
    Andy avatar
    31 posts
    Member since:
    Nov 2010

    Posted 06 Aug 2018 in reply to Marin Bratanov Link to this post

    Thanks for the quick response.  This explanation fixed my issue.
Back to Top