RadMenu OnClientItemClicked on Firefox doesn't work

2 posts, 0 answers
  1. marco
    marco avatar
    33 posts
    Member since:
    Sep 2007

    Posted 04 Jan 2012 Link to this post

    I'm experiencing the following issue on a very simple and basic code:
    The radmenu OnClientItemClicked is not fired only on firefox (ver.7)
    On all the other browser it's working as expected.

    the RadMenu is empty and the items are added in code-behind:

    RadMenuItem rmiItem = new RadMenuItem();
    rmiItem .Text = "Menu Voice Text";
    rmiItem .Value = "http://www.someurl.com";
    //rmiItem .NavigateUrl = "#";
    rmMainMenu.Items.Add(rmiItem );

    and here is the radmenu in the aspx page:


    <telerik:RadMenu ID="rmMainMenu" runat="server" Skin="Office2007" OnClientItemClicked="OnClientItemClicked" Width="100%">
    <Items>
    </Items>
    </telerik:RadMenu>


    once the user click over the menu item the following javascript is executed:

    <script type="text/javascript">
        function OnClientItemClicked(sender, eventArgs) {
            var item = eventArgs.get_item();
            submitTo(item.get_value());
        }
     
        function submitTo(url) {
            form2.action = url;
            form2.submit();
        }
     
    </script>

    In IE7, IE8, Chrome and Safari, everything works as expected and the user is redirected to the page specified in the Value attribute of the RadMenu.
    Only in Firefox, instead it does nothing, except that putting a # at the end of the URL (is not a postback)

    Please note that this code is used to perform a POST submit of data to a different URL so, for this reason I haven't used the property NavigateURL.
    In any case it works in the other browser so it's something wrong with RadMenu and Firefox.

    Any help is appreciated.
    Thanks
    Marco

  2. marco
    marco avatar
    33 posts
    Member since:
    Sep 2007

    Posted 04 Jan 2012 Link to this post

    SOLVED

    and the error was on my side.
    to access the form on FF I have to use
    document.Forms["formname"].action = "....";

    my fault and sorry to doubt about Telerik! 
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top