Todd
Todd

Reputation: 1822

Hover over image to get popup with Flash player embedded with .NET

Not sure if this is possible but here is what I would like to do:

I have a dropdown list and when a user selects an item i would like to show a thumbnail of document. Easy enough.

Now when a user hovers over the document I would like to show a small popup that could display the actual document. The popup would be small and similar to the intext advertising popups. The size is nice and unobtrusive. I could embed an object from DocStoc or I could convert my PDFs to Flash.

Anyone have recommendations for this or experience doing something similar?

Upvotes: 0

Views: 628

Answers (1)

Cfreak
Cfreak

Reputation: 19309

You could do this in straight Javascript or in probably even easier in jQuery or something similar. Here's what I'd do in jQuery:

$('#previewdiv').hover( function() {
     window.open( 'pdf_viewer.asp?document=whatever.pdf','PDF Window','width=640,height=500,etc ...');
});

You could open the PDF itself but it would give you less control over that window so embedding is probably the way to go.

I would also suggest that you let your user click on the document instead of hovering. If they accidentally mouse over that can create load on your server and be annoying to the user. Not only that but most pop-up blockers block pop-ups on hover so your users might not ever see it. In my example above just change "hover" to "click" to do it that way.

Upvotes: 1

Related Questions