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

RadConfirm doesn't work

3 Answers 81 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shu Luo
Top achievements
Rank 1
Shu Luo asked on 17 Jul 2009, 03:32 AM
html:
<img id="delete" src="../Images/delete.gif" class="vodelete" onclick="return vodelete(this)" />

javascript:

function vodelete(object)
{

     function callBackFn(arg)
     {
            if(arg)
            //do something
      }  
      radconfirm('Are you sure?',callBackFn,330,100,null,'system');
}

but it doesn't work, i don't know where the problem is,thanks!

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Jul 2009, 06:24 AM
Hello,

Congrats Shu Luo, Your code works fine in my end. Here is my code.

aspx
 
<img id="delete" src="../../Images/ModalDialogConfirm.gif" onclick="return vodelete(this)" /> 
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
</telerik:RadWindowManager>         
 
<asp:ScriptManager ID="ScriptManager1" runat="server"
</asp:ScriptManager> 

javascript
 
<script type="text/javascript"
function vodelete(object) 
     function callBackFn(arg) 
     { 
            if(arg) 
            { 
               //do something 
               alert('OK'); 
            } 
            else 
            { 
                alert('Cancel'); 
            } 
      } 
      radconfirm('Are you sure?',callBackFn,330,100,null,'system'); 
</script> 
Have you placed RadWindowManager in your page?

-Shinu.
0
Shu Luo
Top achievements
Rank 1
answered on 17 Jul 2009, 09:08 AM
Thanks very much.
But i have another question now,that is all buttons can't work while radconfirm works.
0
Fiko
Telerik team
answered on 22 Jul 2009, 11:22 AM
Hi Shu,

The radconfirm dialog (and all predefined dialogs) has modal behavior by default. In this case when the radconfirm is shown the interaction with the rest of the page is not possible and this behavior is the expected one.

In case that you need to set a non-modal behavior to a radconfirm (for example) you could use the following approach :

 
var oConfirm = radconfirm("Are you sure ?", callbackFunction); 
oConfirm.set_modal(false); 

I hope this helps.

Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Shu Luo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Shu Luo
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or