By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,357 Members | 982 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,357 IT Pros & Developers. It's quick & easy.

Dynamically Resize Container of Photo (gif)

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:Or**************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2

P: n/a
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

"Praveen Pandey" <pr************@hotmail.com> wrote in message
news:un**************@tk2msftngp13.phx.gbl...
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
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:Or**************@TK2MSFTNGP12.phx.gbl...
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


Nov 18 '05 #3

P: n/a
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
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

"Praveen Pandey" <pr************@hotmail.com> wrote in message
news:un**************@tk2msftngp13.phx.gbl...
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
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:Or**************@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.