Dynamically Resize Container of Photo (gif)

  • Thread starter Thread starter Guadala Harry
  • Start date Start date
G

Guadala Harry

Here's the functionality I'm after:

I need for a page to display a photo. When users click on other links within
the page, the photo changes. I'd like to swap out the photo without doing a
Postback of the entire page.

I initially implemented this with an aspx page that contains an IFame which
displays only the picture (gif). The behavior was what I wanted, but the
problem is that the IFrame does not resize with the photo... consequently
some photos appear to be cropped and others have white space around them. It
appears that IFrames are unaware of the content being displayed in the page
they are hosting - thus no way to dynamically resize the IFrame itself.

Any suggestions for getting the desired effect would be greatly appreciated.
It's important that the photo can be swapped out without a postback of the
entire page.

Thanks!

-GH
 
A simple way would be to use Div tag and bring all the images to the client
(IE) and then dynamically change its diplay property to show or hide...
Hope that helps...


Praveen
 
Sounds good... how do I bring all the images down to the client without
displaying them? And then what would be the path used for the DIV display
property in the client-side code?

Thanks!

-GH
 
You could implement the code as if you are showing all the images. and in
the div assign it to display = block or none (i dont rememeber which one)

Praveen
 
Back
Top