RadMenu Cancel Page Request

2 posts, 0 answers
  1. Dheeraj
    Dheeraj avatar
    11 posts
    Member since:
    Mar 2009

    Posted 11 Jun 2010 Link to this post


    I am using Latest Telerik ASP.Net AJAX controls in my application.Now I have some urgent requirement from Client which we need to solve. I am using RadMenu in my application. Now my problem is -

    For example suppose Menu have 5 pages under it, say page's name are Page1, Page2, Page3, Page4 and Page 5.
    Now when user click on Page1 from menu then suppose it takes 160 seconds to load, after that user click on Page2 which takes 45 seconds to load, and after that user click on Page5 which take 3 seconds to load.

    Now if user Click on Page1 and after that he changes his mind and dont want to wait for page1 for 160 seconds, and click on page5 to see it.

    My problem is that is there is any solution sothat when user click on Page from menu ,then If any previous page request is in progress for any page then cancel it, and handle only current page request.  ( For example in above case when user click on Page5 then cancel the request for Page1 and handle request for page5 only which take only few seconds to load. )

    Please suggest me the solution, If my point is not clear then I can provide more detail as per the request.

    Dheeraj Chauhan.

  2. T. Tsonev
    T. Tsonev avatar
    2834 posts

    Posted 18 Jun 2010 Link to this post

    Hello Dheeraj,

    Thank you for the detailed description of the problem. You can use the window.stop() function to stop loading the current page and navigate to the new one immediately.

    <script type="text/javascript">
        function onItemClick(sender, eventArgs)
            if (window.stop) 
                document.execCommand("Stop"); // IE
    <telerik:RadMenu ID="RadMenu1" runat="server" EnableSelection="true" OnClientItemClicking="onItemClick">
            <telerik:RadMenuItem Text="Slow page" NavigateUrl="Slow.aspx">
            <telerik:RadMenuItem Text="Fast page" NavigateUrl="Fast.aspx">

    I hope this helps.

    Kind regards,
    Tsvetomir Tsonev
    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
Back to Top