select multiviewpage on hover but with a delay

4 posts, 0 answers
  1. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 26 Aug 2008 Link to this post

    I have been able to make a tabstrip switch a multiview based on hovering the mouse over the tab correctly, unfortunately it's too fast! is there a way to do a delay so that it only switches the tab if the mouse hovers for say 1 second or so? this is the code I'm using to select on hover:

    <

    script type="text/javascript">
    <!--
    function onMouseOver(sender, args)
    {
    var SelectedTab = args.Tab;
    SelectedTab.Select();
    }
    -->
    </script>

  2. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 26 Aug 2008 Link to this post

    well i ended up cooking up a quick solution, suggestions for improvement are welcome, hope it is helpful to someone else:

    <

    script type="text/javascript">
    <!--
    var SelectedTab;

    function onMouseOver(sender, args)
    {
    SelectedTab = args.Tab;
    window.setTimeout(selectTab, 500);
    }

    function onMouseOut(sender, args)
    {
    SelectedTab =
    null;
    }

    function selectTab()
    {
    if (SelectedTab != null) SelectedTab.Select();
    }

    -->

    </script>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 29 Aug 2008 Link to this post

    alright well after updating to the newest ajax controls, this code no longer works :( I'm getting undefined for args.Tab, when the documentation clearly states this is how to get the selected tab... can someone help me here?

    thanks!
  5. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 29 Aug 2008 Link to this post

    oops I am silly I was looking at old documentation. I really wish you guys had made the disctinction clearer between radcontrols and radcontrols for ajax.

    anyway the method is args.get_tab(); and SelectedTab.select();

    thanks!
Back to Top