Navigate URL using Access Key.

4 posts, 0 answers
  1. Ramakrishna Thadivaka
    Ramakrishna Thadivaka avatar
    5 posts
    Member since:
    Jan 2010

    Posted 04 Mar 2010 Link to this post

    Hi There,

    Thanks for the previous reply's here i was struck up with one problem which is i am unable to access particular page directly using Access Key's such as i am unable to Access any navigate URL page directly without clicking "Enter: instead it is only selected.

    Can help me out how can i navigate directly by using access keys with out clicking "Enter".



    Thanks in Advance,
    T.Ramakrishna.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Mar 2010 Link to this post

    Hello Ramakrishna,

    You can handle OnClientItemFocus:

    <script type="text/javascript">
           function OnClientItemFocus(sender, eventArgs) {
               window.navigate(eventArgs.get_item().get_navigateUrl());
           }
       </script>
       <telerik:RadMenu ID="RadMenu1" OnClientItemFocus="OnClientItemFocus" runat="server">
           <Items>
               <telerik:RadMenuItem runat="server" AccessKey="t" Text="telerik" NavigateUrl="http://www.telerik.com">
               </telerik:RadMenuItem>
               <telerik:RadMenuItem runat="server" AccessKey="g" Text="google" NavigateUrl="http://www.google.com">
               </telerik:RadMenuItem>
           </Items>
       </telerik:RadMenu>


    All the best,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vesko
    Vesko avatar
    122 posts
    Member since:
    Mar 2009

    Posted 09 Mar 2010 Link to this post

    This is not possible out of the box. The purpose of the Access Keys is to select/focus the item, not to click it.

    You can easily test this with an <A> element:

    <href="http://www.google.com" accesskey="N" >Click Alt+N (in IE) to focus me</a> 

    The element is just focused, but you still need to hit Enter to navigate to that page.
  5. Sanjay
    Sanjay avatar
    5 posts
    Member since:
    Dec 2011

    Posted 30 Dec 2011 Link to this post

    Hi,
    I am focusing radmenuitem, but it should navigate on enter key after focus.

    Please suggest a solution.
    Thanks in advance.

    Regards,
    Sanjay
Back to Top