473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Dynamically Resize Container of Photo (gif)

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
3 2963
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Philip D Heady | last post by:
Ok, here's my code. Can't get it to check file extension properly or file size...had it working before but not sure why it's buggy now. } elseif ($photo) { $ext = strtolower(substr($photo,...
1
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the...
3
by: Sunshine | last post by:
Ok - this is driving me crazy. I found a lot of threads about this topic but nothing has helped me. I'm sorry if I'm posting this in the the wrong place. I have the following code in a .net...
3
by: Noozer | last post by:
I have a Windows 2000 server. My ASP application allows users to upload a photo for display to other users. Unfortunately everyones photos are different sizes. I'd like to resize the photo to 150px...
2
by: J'son | last post by:
Guys, I have built an application for a client that allows people to list their products for sale along with a photo of the product. If the photo is too big, I currently resize it down when the...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
7
by: mishrarajesh44 | last post by:
hii all Truly telling i hav got this code from net & i am finding error while running the code below.. code:- <?php $idir = "photo/"; // Path To Images Directory $tdir =...
1
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one...
1
by: Starance | last post by:
Well... I'm not sure if this can be fixed, I've tried many ways. But here goes; When you resize your browser window it seems to move my video & photo divs. I want them kept in line with the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.