On click event with comments section

2 posts, 0 answers
  1. Darrin
    Darrin avatar
    3 posts
    Member since:
    Nov 2015

    Posted 15 Jan 2016 Link to this post

    I'm using a rad button to ask the user if they want to cancel a request. See code below  

    Is there a way to incorporate a comments section that will allow users to say why they want to cancel their request ? 


    Any help would be appreciated


     <script type="text/javascript">
        function OnClientClicked(button, args) {
            if (window.confirm("Are You Sure You Want to Cancel This Request?")) {
            else {


    <telerik:RadButton ID="b2" runat="server" ButtonType="LinkButton" 
                                Font-Names="Verdana" Font-Size="Small" Height="30" Skin="Windows7" 
                                Text="Cancel Request" OnClick="b2_Click" OnClientClicked="OnClientClicked">
                                <Icon PrimaryIconCssClass="rbRemove" PrimaryIconLeft="7" PrimaryIconTop="7" />

  2. Vessy
    Vessy avatar
    1660 posts

    Posted 20 Jan 2016 Link to this post

    Hi Darrin,

    The easiest way to achieve the desired scenario is to use the standard window prompt() dialog. For example:
    function OnClientClicked(button, args) {
        if (window.prompt("Are You Sure You Want to Cancel This Request? Why?")) {

    In case you need to customize the prompt dialog itself, I woul advise that you review the following help article describing how this can be achieved with our RadPrompt and/or RadConfirm dialog utilizing their template functionality|:
    How to Change the Dialog Templates

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top