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

Help with Confirm Dialog

1 Answer 68 Views
Window
This is a migrated thread and some comments may be shown as answers.
MissioDei
Top achievements
Rank 1
MissioDei asked on 08 Jan 2010, 05:04 PM
I want to bring up a modal confirmation window when a user clicks a link on my site. This window would basically say that they are leaving our site and we are not responsible, blah blah and when the user clicks "ok" they are redirected to the link.

How would I accomplish this with radcofirm?

I'm still a beginner and having a little hard time understanding the example here: http://www.telerik.com/help/aspnet-ajax/window_dialogsconfirm.html

Where would I insert the link if the dialog returns true?

Thanks for any help.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jan 2010, 08:01 AM
Hi,

Here is the example for redirecting to new page when clicking "Ok" button in Confirm.

ASPX:
 
<input id="Button1" type="button" value="button" onclick="conf();" /> 

JavaScript:
 
<script type="text/javascript"
    function conf() { 
        radconfirm("You are leaving this site and we are not responsible for...", ClientCallback, 480, 180, ''"title");   
    } 
 
    var ClientCallback = function(arg) { 
        if (arg) { 
            // Clicked Ok - arg returns true 
            window.location = "http://www.google.com"
        } 
    }  
</script> 

-Shinu.
Tags
Window
Asked by
MissioDei
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or