frames and navigation from a button

3 posts, 0 answers
  1. Dan
    Dan avatar
    4 posts
    Member since:
    Jul 2011

    Posted 09 Aug 2011 Link to this post

    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. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 11 Aug 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dan
    Dan avatar
    4 posts
    Member since:
    Jul 2011

    Posted 11 Aug 2011 Link to this post

    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">

     

Back to Top