This is a migrated thread and some comments may be shown as answers.

select multiviewpage on hover but with a delay

3 Answers 26 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
SelAromDotNet
Top achievements
Rank 2
SelAromDotNet asked on 26 Aug 2008, 03:52 PM
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>

3 Answers, 1 is accepted

Sort by
0
SelAromDotNet
Top achievements
Rank 2
answered on 26 Aug 2008, 07:10 PM
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>

0
SelAromDotNet
Top achievements
Rank 2
answered on 29 Aug 2008, 03:23 PM
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!
0
SelAromDotNet
Top achievements
Rank 2
answered on 29 Aug 2008, 03:28 PM
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!
Tags
TabStrip
Asked by
SelAromDotNet
Top achievements
Rank 2
Answers by
SelAromDotNet
Top achievements
Rank 2
Share this question
or