Menu will not load page in specified Target Frame

2 posts, 0 answers
  1. Brad
    Brad avatar
    8 posts
    Member since:
    Jun 2009

    Posted 07 Oct 2009 Link to this post

    I am trying to have a RadMenu navigate to a specific page in a specific "frame". Now the frame can be an IFrame or a RadPane, I'm not picky, just needs to work. Is there something obvious here that's preventing it from working?

    What's happening is the page is being loaded into a new window.

    I am using version 2009.2.821.35


    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <

     

    tr>

     

     

     

     

        <td></td>

     

     

     

     

        <td>

     

     

     

     

            <

     

    telerik:RadMenu ID="RadMenu1" runat="server" Skin="Black" Width="1000px" OnItemClick="RadMenu1_ItemClick">

     

     

     

            <Items>

     

     

     

                <telerik:RadMenuItem runat="server" NavigateUrl="home.aspx" Text="Home" Target="Main">

     

     

     

                </telerik:RadMenuItem>

     

     

     

                <telerik:RadMenuItem runat="server" NavigateUrl="Portfolio.aspx" Text="Portfolio" Target="Main">

     

     

     

                </telerik:RadMenuItem>
            </Items>

     

     

             </

     

    telerik:RadMenu>
        </td>
    </tr>
     <tr>

     

     

     

     

     

        <td></td>

     

     

     

     

        <td>

     

     

        

     

    <iframe id="Main" runat="server" src="Home.aspx" ></iframe>

     

     

     

     

        </td>

     

     

     

     

    </tr>
    </table>

    Thanks,

     

     

     

     

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 08 Oct 2009 Link to this post

    Hi Brad,

    In order to achieve your goal, you should target the iframe by its name. If it's a RadPane your can target it by its ID then.Please find below your modified code snippet that shows the needed approach.

    <form id="form1" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <table width="100%" cellpadding="0" cellspacing="0" border="0"
            <tr> 
                <td> 
                </td> 
                <td> 
                    <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Black" Width="1000px" _OnItemClick="RadMenu1_ItemClick"
                        <Items> 
                            <telerik:RadMenuItem runat="server" NavigateUrl="home.aspx" Text="Home" Target="Main"
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem runat="server" NavigateUrl="Portfolio.aspx" Text="Portfolio" 
                                Target="Main"
                            </telerik:RadMenuItem> 
                        </Items> 
                    </telerik:RadMenu> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                </td> 
                <td> 
                    <iframe name="Main" runat="server" src="Home.aspx"></iframe> 
                </td> 
            </tr> 
        </table> 
        </form> 


    Kind regards,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top