Client-Site Open RadWindow

3 posts, 0 answers
  1. Mark
    Mark avatar
    132 posts
    Member since:
    Feb 2008

    Posted 02 May 2008 Link to this post

    Hi,
    i am using your sample code but i still keep getting a postback..
    any ideas please?

    <telerik:RadToolBar ID="RadToolBar1" Runat="server" Skin="WebBlue" OnClientButtonClicked="click_handler">

    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

    <Items>

    <telerik:RadToolBarButton runat="server" Text="Open" CommandName="OpenWindow"></telerik:RadToolBarButton>

    <telerik:RadToolBarButton runat="server" Text="New" CommandName="NewWindow"></telerik:RadToolBarButton>

    </Items>

    </telerik:RadToolBar>

    <script type="text/javascript">

    function click_handler(sender, e)

    {

    radopen(

    "http://www.google.com");

    return false; // -> this line will prevent Telerik RadToolBar from performing a postback.

    }

    </script>

  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 02 May 2008 Link to this post

    Hello Mark,

    If you want to prevent the postback you should cancel the OnClientButtonClicking event of the button. The proper way to  cancel the event is the following:

    <script type="text/javascript">      
            function clicking_handler(sender, e)      
            {        
                radopen("http://www.google.com");      
                e.set_cancel(true);     
                }     
        </script>  

    Regards,
    Helen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    132 posts
    Member since:
    Feb 2008

    Posted 02 May 2008 Link to this post

    Ah, i see...

    Many Thanks Helen
Back to Top