Forum Moderators: open

Message Too Old, No Replies

Image loading in hidden layer

image loading in hidden layer

         

calhcm22

1:57 pm on May 1, 2003 (gmt 0)

10+ Year Member



I am making a portfolio site ( snip ) . When people click on the images in the page, right now I have it set up to open a blank browser with the image inside. I would prefer to have the image load as a layer on top and just use show-hide layer functions to open and close layers. However, there are many images that I have there and would rather not have everybody downloading all the images. I am curious if browsers load the images in hidden layers, and if they do, how do I stop them from loading until they click to show the layer?

[edited by: korkus2000 at 2:00 pm (utc) on May 1, 2003]
[edit reason] no personal urls please [/edit]

WibbleWobble

2:57 pm on May 1, 2003 (gmt 0)

10+ Year Member



For the purpose, it'd probably be much simpler to use an iframe where you planned on positioning the layer.
It requires no javascript, loads in the same window, and doesn't load all the images at once, as 'layers' (eugh) would, without some bizarre JS.

(Browsers should, to my knowledge, load the hidden content [images, text] regardless)

benihana

2:57 pm on May 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i tried to do something similar once, having thumbnails as links which showed the main image in a layer when clicked.

I found that sometimes if the thumbs were clicked before the page had finished loading, the layer would display fine with the main image, but the rest of the page stopped loading.

to get back to the question, you could try the code for the hidden layers/images right at the bottom of the html, so they load in the background after the rest of the page has finished, and use position:absolute to put them where you want.

calhcm22

3:06 pm on May 1, 2003 (gmt 0)

10+ Year Member



iframes i believe are too new and are too buggy... and with the bottom of the html trick, i'm trying to do this to keep down bandwidth, yet also make navigation simpler (not opening another browser). I'm also open to suggestions if something like php would do the trick (i'm trying to learn php also). Basicly, i want an "onClick: load div id="whatever" show div id="whatever" " as I can just put the image as the background of the div tag in the css, so it isn't loading in the html.

benihana

4:05 pm on May 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i dont think php will do it without reloading the page

but my php knowledge is limited to say the least:)

grahamstewart

4:26 pm on May 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



iframes i believe are too new and are too buggy...

iframes have been part of HTML since the W3C released the HTML 4.0 [w3.org] recommendation at the end of 1997.

I would have thought most of the bugs might have been ironed out by now?