Error On Displaying Confirm Dialog on Button Click

2 posts, 0 answers
  1. Tracy
    Tracy avatar
    118 posts
    Member since:
    Nov 2010

    Posted 01 Apr 2013 Link to this post


    I am trying to display a confirm dialog box on the button click and keep getting an erro 'Object expected' r on the following line.

    radconfirm(text, callBackFunction, 500, 100, null, "Delete Record"

    I am calling the function on the OnClientClicking

    <telerik:RadButton ID="rbtDeleteSetting" runat="server" SkinId="skn_SavedSettings_Delete" EnableViewState="true" OnClientClicking="DeleteOnClientClicking" CommandArgument="Display"/>

    Here is the complete function
    function DeleteOnClientClicking(sender, args)


                   varcallBackFunction= Function.createDelegate(sender, function(argument)


                     if (argument)





                 vartext = "Are you sure you want to delete these Saved Settings?<br\>This process CANNOT be un-done.<br\>";

                 radconfirm(text, callBackFunction, 500, 100, null, "Delete Settings");



    I copied the function from one of the demo's so I am not sure why it doesn't work.

    Thank You
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Apr 2013 Link to this post

    Hi Tracy,

    I was not able to replicate the issue. Please have a look into the following code which displays a confirm box using RadWindow.

    <telerik:RadButton ID="RadButton1" runat="server" Text="Delete" OnClientClicking="showConfirmRadWindow"
    <telerik:RadWindow ID="confirmWindow" runat="server" VisibleTitlebar="true" VisibleStatusbar="false"
        Modal="true" Behaviors="None" Height="150px" Width="300px">
            <div style="padding-left: 30px; padding-top: 20px; width: 200px; float: left;">
                <asp:Label ID="lblConfirm" Font-Size="14px" Text="Are you sure you want to Delete?"
                <br />
                <br />
                <telerik:RadButton ID="RadButtonYes" runat="server" Text="Yes" AutoPostBack="false"
                <telerik:RadButton ID="RadButtonNo" runat="server" Text="No" AutoPostBack="false"

    <script type="text/javascript">
        function showConfirmRadWindow(sender, args) {
            $find("<%=confirmWindow.ClientID %>").show();
            $find("<%=RadButtonYes.ClientID %>").focus();
        function confirmResult(sender, args) {
            var oWnd = $find("<%=confirmWindow.ClientID %>");
            if (sender.get_text() == "Yes") {
                $find("<%=RadButton1.ClientID %>").click();

  3. DevCraft R3 2016 release webinar banner
Back to Top