HoverMenuExtender Lazy Loading


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: HoverMenuExtender Lazy Loading

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    2

    Question 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

  2. #2
    Join Date
    May 2009
    Posts
    2

    Thumbs up

    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

  1. Replies: 10
    Last Post: 02-02-2009, 12:24 AM
  2. Replies: 1
    Last Post: 04-26-2007, 06:44 AM
  3. Restoring a database gets stuck in (loading) mode
    By Marc Pflieger in forum Database
    Replies: 0
    Last Post: 09-13-2002, 02:39 PM
  4. SQL Tutorial (Answer Q's & post your reply)
    By bigbastard4 in forum Database
    Replies: 2
    Last Post: 05-16-2001, 07:24 PM
  5. "Please wait...program loading.." message
    By Abdel K. Belkasri in forum ASP.NET
    Replies: 4
    Last Post: 06-16-2000, 09: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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center