|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Layer in Dreamweaver Loading
Hello,
Question using layer in Dreamweaver, I am trying to make a "photo gallery” what I want to do is have thumb nails and when you click on a thumb nail it will show a layer that have a bigger image on it. I have made the whole page, however when the page loads it has to load all of the layers first, which can take a while. Is there a way to have layers not load on page load but to load on showing a layer? If not any other ideas on making a good "photo gallery" that would be easy to add to? Thanks, Norman |
|
#2
|
||||
|
||||
|
Well i guess you could use some javascript for this.
Make a function that uses "document.write" to write in the img scr in the layer when the thumbnail is clicked. |
|
#3
|
|||
|
|||
|
Code:
<script language="javascript" type="text/javascript">
<!--
function ShowLargerImg(image)
{
document.images.largePic.src = 'whateversourceyouwant.gif';
// Call function to show layer here
}
-->
</script>
<div id="PicLayer">
<img name="largePic" src="blank.gif" />
</div>
<a href="javascript:ShowLargerImg('vacation.gif')>Vacaction Pic</a>
This shouldn't be used directly in your code but it's basically an example. What you want to do is have the image in a layer and maybe when the page first loads, you want to use a blank image. You can also incorporate a preloader into the function if you wanted to so that it doesn't show the image before it loads. Last edited by edwinbrains : February 3rd, 2005 at 02:35 PM. |
|
#4
|
||||
|
||||
|
fln_admin: I added [code] tags around your code to make it easier to read. You may like to do this in the future.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Layer in Dreamweaver Loading |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|