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

frames and navigation from a button

2 Answers 107 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 09 Aug 2011, 01:58 PM
Can someone send me the exact steps to click on a button and target a frame named f2 to go to a url.

My menu (radribbonbar) is in frame f1.

I want to store the URI in the button somewhere in frame f1, and when I click on it, frame f2 updates and loads that URI.

I don't see any way to do this easily - this should be very easy to do.

2 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 11 Aug 2011, 05:43 PM
Hello Dan,

You can store the ulr in the Value property of all action items (Button, SplitButton, ToggleButton, MenuItem etc.) and capture the appropriate click event client side and load the url in the iframe through JavaScript. Here is a list with the client-side events: http://www.telerik.com/help/aspnet-ajax/ribbonbar-client-programming-basics.html

Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Dan
Top achievements
Rank 1
answered on 11 Aug 2011, 06:04 PM
For those of you who wish to handle buttons which are in a separate frame from your menu, I wrote this:

<

 

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

<

 

 

script type="text/javascript">

 

<!--

 

 

function TabChanged(sender, args) {

 

 

 

var fname = "f2"; // target bottom "working" frame

 

top.frames[fname].location.href = args.get_tab().get_value();

}

 

 

function ButtonClicked(sender, args) {

 

 

 

var fname = "f2"; // target bottom "working" frame

 

top.frames[fname].location.href = args.get_button().get_value();

}

-->

</

 

 

script>

 

</

 

 

telerik:RadCodeBlock>


which you can use as handlers in your ribbonbar:

 

 

 

<telerik:RadRibbonBar ID="RadRibbonBar1" runat="server"

 

 

 

onclientselectedtabchanged="TabChanged"

 

 

 

OnClientButtonClicking="ButtonClicked">

 

Tags
RibbonBar
Asked by
Dan
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Dan
Top achievements
Rank 1
Share this question
or