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

Client-Site Open RadWindow

2 Answers 86 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 02 May 2008, 10:38 AM
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 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 02 May 2008, 02:46 PM

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
0
Mark
Top achievements
Rank 1
answered on 02 May 2008, 02:48 PM
Ah, i see...

Many Thanks Helen
Tags
ToolBar
Asked by
Mark
Top achievements
Rank 1
Answers by
Helen
Telerik team
Mark
Top achievements
Rank 1
Share this question
or