-
HoverMenuExtender Lazy Loading
I have user avatars through my site and what I want is to have a hovermenu displayed on mouseover that shows stats about the user. (Stats, recent activities, recent posts, etc.) For obvious reasons I don't want to have this loaded on page_load and using a DynamicService call seems like it'd be cumbersome at best. (I'd need to pass back images from the database, stats, post strings, etc)
I'm trying to get this to work using a hovermenuextender. So far so good. I'm able to get the menu to display without issue. The problem comes in trying to make it load dynamically onmouseover. I found a link explaining how to accomplish lazy loading using tabcontainers and tried to modify the code to work for the hovermenuextender.
I feel like I'm REALLY close. The very last avatar rendered on the page works correctly. In fact, hovering over an avatar at the top of the page will cause the very last avatar to load it's content so that when you then hover over the last one the content within it is already populated properly. Hovering over any other avatar makes it look like nothing is happening. The loading gif/message just stay visible. I'm sure I'm missing something simple.
Any ideas?
Here's my code:
http://pastebin.com/m5ce4d9f4
-
Just figured it out.
My Page_Load event hookup should've been:
UserImg.Attributes.Add("onmouseover", "javascript:OnHover('" +this.imageHoverTrigger.UniqueID +"')");
and the javascript function should've been:
function OnHover(image) {
__doPostBack(image, '');
}
I'm not sure how the page is rendered, but trying to pass in the dummy event trigger at run time was causing confusion somewhere. In any case, I was about to head down the jquery route when I solved my problem.
Similar Threads
-
By shamsam1 in forum VB Classic
Replies: 10
Last Post: 02-01-2009, 11:24 PM
-
By asifaziz in forum AJAX
Replies: 1
Last Post: 04-26-2007, 05:44 AM
-
By Marc Pflieger in forum Database
Replies: 0
Last Post: 09-13-2002, 01:39 PM
-
By bigbastard4 in forum Database
Replies: 2
Last Post: 05-16-2001, 06:24 PM
-
By Abdel K. Belkasri in forum ASP.NET
Replies: 4
Last Post: 06-16-2000, 08:13 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|