Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts

Saturday, March 24, 2012

Modal popup with an image loaded from a database

I am having a bit of a problem using a modal popup which loads an image from a database. The image loads fine however the first time each image is loaded the modal popup is stuck at the top of the page with the very top of the modal extending over the top of the page. Once the image is cached and I attempt to view it again everything displays correctly. I'm not sure of the best way to fix this problem. Is there a way to have the popup only load once all of the data within the update panel has completely loaded? Here are a few code snippets so you can get an idea of what I'm doing.


I'm opening the modal when the selected item in the datagrid is changed.

protected void Grid_SelectionChanged(object source, EventArgs e)
{
dispIMG.ImageUrl ="viewImage.aspx?qIID=" + itemDG.SelectedItem.Cells[1].Text +"&sSide=Front";
 ModalPopupExtender.Show();
}
 
Any suggestions as to how I could fix this would be greatly appreciated.
 
cheers
 

any thoughts? I've tried using thread.Sleep to get the image to load before it actually opens the modal, but this doesn't seem to work. Once the image is initially loaded just simply scrolling the screen or reloading it makes everything display correctly. Banging my head on my desk for this one.

~David

Modal window underneath flash graphic

I have a popupmodal window that has quite a bit of info in it. It's the full lenght of the page, but it appears underneath the flash header that's at the top of the page, but over top everything else on the page. Here is the code for the flash file. Anyway to get the popup to be on top of the flash graphic?

<embedsrc="~images/top_banner.swf"width="100%"/>

Thanks!

Hi, you'll have to add a the wmode attribute to you html, because flash movies - by default - are drawn as topmost window objects in any browser.

The following html will do the trick:

<embedsrc="~images/top_banner.swf"width="100%"wmode="opaque"/>

--Victor


Perfect thanks!