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

[Solved] RadConfirm Dialog

3 Answers 179 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dany V
Top achievements
Rank 1
Dany V asked on 20 Jul 2009, 10:45 PM
Hi there!! I have a question for you guys...in a radconfirm dialog, I would like to post a value of one control of a form inside the message of the radconfirm, for example; I have a label that says "Daniel", so in the radconfirm I want to ask: Are you "Daniel"??? ...

Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 21 Jul 2009, 06:18 AM
Hi Daniel,

You can try the following approach in order to show Label text in RadConfirm.

ASPX:
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
</telerik:RadWindowManager> 
<asp:Label ID="Label1" runat="server" Text="Daniel"></asp:Label> 
<input id="Button1" type="button" value="button" onclick="ConfirmIt();" /> 

JavaScript:
 
<script type="text/javascript"
function ConfirmIt() 
{     
     var text = document.getElementById('Label1').innerText; 
     radconfirm('Are you sure, '+ text +'?',callBackFn1,330,100,null,'conform'); 
function callBackFn1(arg) 
    if(arg) 
    { 
        alert('OK'); 
    } 
    else 
    { 
        alert('Cancel'); 
    } 
</script> 

-Shinu.
0
Dany V
Top achievements
Rank 1
answered on 21 Jul 2009, 03:01 PM
Hi Shinu, thanks for the reply but actually I still can't make it work, when I debug the application and click the button, it says that an "Object is Required" and mark me this line:

 

var label = document.getElementById('Lbl_ID').innerText;

Thanks!

 

0
Dany V
Top achievements
Rank 1
answered on 21 Jul 2009, 04:01 PM
hey again!!! I fixed the problem just getting out the Label from the FormView...thanks!!!
Best Regards!
Tags
Window
Asked by
Dany V
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Dany V
Top achievements
Rank 1
Share this question
or