PDA

View Full Version : I'm back.. lol


Muffin_LA
23-07-2005, 15:51/03:51PM
Hi again:

Ok I am working on my final project. What I am trying to do is this:

I have 3 children and I want to have 3 main pictures of them and when you move your mouse over the pics it shows another picture. I can get the first one to work fine but I get errors on the second one. This is the codes I have so far.


function SwapImg(idx, img)
{
document.images[idx].src = img;
}
#logan {
position: absolute;
z-index: 1;
top: 150px;
left: 225px;
width: 100;
}
#babylogan{
position: absolute;
z-index: 0;
top: 150px;
left: 225px;
width: 100;
}
#cass {
position: absolute;
z-index: 3;
top: 150px;
left: 225px;
width: 100;
}
#babycass{
position: absolute;
z-index: 2;
top: 150px;
left: 225px;
width: 100;
}
<a href="#" onMouseOver="SwapImg(0, 'babylogan.jpg')"
onMouseOut="SwapImg(0, 'logan.jpg')">
<img border="0" src="logan.jpg" height="300" width="400" alt="Logan" /></a>
<a href="#" onMouseOver="SwapImg(2, 'babycass.jpg')"
onMouseOut="SwapImg(2, 'cass.jpg')">
<img border="0" src="cass.jpg" height="300" width="400" alt="Cassandra" /></a>

Logan's pics work but Cassandra's doesnt. I also have to add one more set of pics for my other daughter.

Thank you again for all your help. The next course I am taking is Javascript so hopefully I will be able to figure this out on my own after I finish it.

Linda:confused:

chrishirst
23-07-2005, 20:18/08:18PM
Here's one I prepared earlier :D
Preview Gallery (http://www.candsdesign.co.uk/page-templates/two-column/preview-photo-gallery/layout.asp)

and the code is
here (http://www.candsdesign.co.uk/page-templates/two-column/preview-photo-gallery/show-code.asp)

Muffin_LA
24-07-2005, 02:12/02:12AM
Hi chrishirst:

Thank you for your help. I sat down and tried to figure it out but its not working for me. I just dont think I understand enough of Javascript yet to do what I want to do for this project. So I am just going to think of another way to do this page.

Thanks again and I hope one day I can be as good as Javascript as you are :)
Linda