Dynamically Resize Container of Photo (gif)

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
 
P

Praveen Pandey

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
 
G

Guadala Harry

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
 
P

Praveen Pandey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top