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

A way to delay the firing of OnAjaxRequest?

1 Answer 56 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Darryl
Top achievements
Rank 1
Darryl asked on 16 Feb 2012, 04:49 PM
Hi all,

I'm a complete beginner with Telerik so I hope I explain this right.  

I have a RadMenu set up where you can mouseover a RadMenuItem and it calls an AJAX method to fetch a description, which then gets displayed in a label at the bottom of the menu.  It's something along the lines of this Telerik demo with the map, except the event is onmouseover and not onclick.  This all works great. 

However, you can imagine if someone is mousing down a menu of say 20 items, you only want the Ajax call to fire when the user rests on a particular menu item e.g. for say at least 0.25 seconds.  That way I'm not sending 20 Ajax calls off unnecessarily.

Is there a way to delay the firing of the Ajax call?

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 21 Feb 2012, 09:28 AM
Hi,

In general the functionality that you are trying to achieve is a custom scenario and we do not officially provide support for it. However, there are two properties - set_collapseDelay/get_collapseDelay and set_expandDelay/get_expandDelay - of the RadMenu control that you might try using in your scenario. You can use jQuery in order to implement the desired functionality. Here are few forum post that I believe will be helpful:

http://www.dynamicdrive.com/forums/showthread.php?t=24160
http://www.itpile.com/r2059/jquery-mouseover-delay
http://stackoverflow.com/questions/435732/delay-jquery-hover-event


Greetings,
Maria Ilieva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Ajax
Asked by
Darryl
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or