1. Saravanan
    Saravanan avatar
    26 posts
    Member since:
    Mar 2013

    Posted 23 May 2013 Link to this post

    Hi,

    There is a Enter Promocode link button on my page. On Clicking this button, I need to display a small dialog box asking the user to enter code. Once the user enter the code, I need to pass it to another JavaScript function? For this, I dont need RadWindow with contenttemplate.

    Thanks,
    Saravanan.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 May 2013 Link to this post

    Hi

    You can use a RadPrompt to achieve your requirement. In order to use this dialog you need to have a RadWindowManager on the page. Please have a look at the following code I tried which works fine at my end.

    ASPX:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Windows7">
    </telerik:RadWindowManager>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Enter PromoCode" ButtonType="LinkButton" AutoPostBack="false"
        OnClientClicked="OnClientClicked">
    </telerik:RadButton>

    JavaScript:
    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            radprompt('Enter Promo Code', promptCallBackFn);
        }
        function promptCallBackFn(arg) {
            alert("The Promo Code you entered is : " + arg);
        }
    </script>

    Thanks,
    Shinu.
Back to Top