Quick HTML holding page question
Quick HTML holding page question
Author
Discussion

Morningside

Original Poster:

24,143 posts

249 months

Thursday 4th February 2010
quotequote all
As a holding page I would like to just display a picture.
Is there anyway if I make it really big (1600x1200) to autosize downto what ever the users screen is?

(Yes I know it may take an age at the remote end, but thats not important).

SlipStream77

2,153 posts

211 months

Thursday 4th February 2010
quotequote all
I think JavaScript will solve the problem.

ETA, resizing the image is easy, here's the code for detecting the resolution...

http://www.pageresource.com/jscript/jscreen.htm

Why not have several common res. images available and only have the client download the one that fits?

HTH

Edited by SlipStream77 on Thursday 4th February 20:57

grumbledoak

32,285 posts

253 months

Thursday 4th February 2010
quotequote all
Javascript at the client can send the screen dimensions as part of the request. You could even do it as part of the URL, and pre-generate the possible holding pages so it is all served statically.

cottonfoo

6,032 posts

230 months

Thursday 4th February 2010
quotequote all
Just set height=".." width=".." attributes in your img tag, you will need to keep the aspect ratio the same.

ETA, I mean use a percentage (maybe even 100%) depending on what you want.

Edited by cottonfoo on Thursday 4th February 21:00

Morningside

Original Poster:

24,143 posts

249 months

Thursday 4th February 2010
quotequote all
Oh hell! not as easy as I thought frown
So I need different image sizes for each one? What about if I set as background image, would that autosize?

grumbledoak

32,285 posts

253 months

Thursday 4th February 2010
quotequote all
No, if you do as cottonfoo suggests the client will re-size as best it can and you can have a static page.

If you want more control over the image/bandwidth, you can have multiple holding pages and use Javascript on the page before so the link/submit chooses the right one.

Clearer?


Actually, scrub that. Either way you need Javascript to pass the resolution in the request (or a previous one), then you need to either generate the IMG tag parameters, or select a static holding page.

ETA2- Alternatively again, you could use the Javascript like that used on these pages, which re-sizes the images after the page has loaded. It's a horrid visual effect, though. Either of the other two would look better.

Edited by grumbledoak on Thursday 4th February 21:09