PDA

View Full Version : Image load on click not page load?


haymaker
05-22-2005, 07:53 PM
Im workin on a website and want to keep it all on one page but its causing long load times

at the moment there are images that are in hidden layers when the page loads but on click of a certain image are shown but havin these large images on one page makes it up to around 300kb witch makes for a much longer load than id like

its at www.furyofficial.tk the pictures im on about are:
when you click biography
4 names show
click a name a picture an info show

i want these images to be loaded when the name is clicked not on page load


thanks for any help :)

haymaker
05-22-2005, 08:04 PM
i guess to do this theres a diffrent function/behavour than show/hide layer where you can load layer on click but i dont no what or where to find this

domedia
05-23-2005, 02:37 PM
I doin't think there is such a function. If the image is in img src in your html, it will load when page loads. You probably want to have it like this too. Now your image displays immidiately onClick. If you were to find a way to load the image only when something is cliecked, there's going to be a pause, some timelapse while the image is loading until it can display.

haymaker
05-23-2005, 03:15 PM
I doin't think there is such a function. If the image is in img src in your html, it will load when page loads. You probably want to have it like this too. Now your image displays immidiately onClick. If you were to find a way to load the image only when something is cliecked, there's going to be a pause, some timelapse while the image is loading until it can display.
yeah im using the normal image source html, your right the user would have to wait intill the picture loads if i found a way to have the pictures load on click not page load. I was just trying to find away to cut down the inital load time of the page by only loading pictures when and if there needed

cheers for the input

domedia
05-23-2005, 04:07 PM
You could maybe delete the size problem all togteher by optimizing your images more? Do you have this page online anywhere?

haymaker
05-23-2005, 04:16 PM
yeah its up at http://www.furyofficial.tk ('http://www.furyofficial.tk') i have fitted the images to the pixel though before i did that it was a huuge load time cant think of any other way to cut down load time than image load on click idea