Hallo!
Habe wieder mal ein typisches Anfängerproblem: Wie kann ich mit einem Klick auf die Links oben eine Bildergalerie mit den entsprechenden Bildern öffnen? Was für einen Quellcode brauche ich dafür?
Hier das, was ich bisher habe:
<html>
<head>
</head>
<body background="Wallpaper.jpg" text="#000066" bgcolor="#99ff66" link="#000066" alink="#990000" vlink="#66cc00">
<center>
<a href="http://www.html-seminar.de/" target="_blank">
<img src="htmlseminar.jpg" width="474" height="66" border="1" alt="html-seminar.de - jetzt HTML lernen" />
</a>
</center>
<script language="JavaScript">
function clean ()
{
if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt (0)<'5'))
{
window.document.b.visibility="hide";
window.document.m1.visibility="hide";
window.document.m2.visibility="hide";
window.document.m3.visibility="hide";
return;
}
if (navigator.appVersion.charAt (0)<'5')
{
var layers=document.all.tags ("div");
}
else {
var layers=document.getElementsByTagName("div");
}
layers[0].style.visibility='hidden';
layers[2].style.visibility='hidden';
layers[4].style.visibility='hidden';
layers[6].style.visibility='hidden';
return;
}
function menu (i)
{
switch(i)
{
case 1:
{
if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
{
window.document.b.visibility="show";
window.document.m1.visibility="show";
window.document.m2.visibility="hide";
window.document.m3.visibility="hide";
return;
}
if (navigator.appVersion.charAt (0)<'5')
{
var layers=document.all.tags ("div");
}
else {
var layers=document.getElementsByTagName("div");
}
layers[0].style.visibility='visible';
layers[2].style.visibility='visible';
layers[4].style.visibility='hidden';
layers[6].style.visibility='hidden';
return;
}
case 2:
{
if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
{
window.document.b.visibility="show";
window.document.m1.visibility="hide";
window.document.m2.visibility="show";
window.document.m3.visibility="hide";
return;
}
if (navigator.appVersion.charAt (0)<'5')
{
var layers=document.all.tags ("div");
}
else {
var layers=document.getElementsByTagName("div");
}
layers[0].style.visibility='visible';
layers[2].style.visibility='hidden';
layers[4].style.visibility='visible';
layers[6].style.visibility='hidden';
return;
}
case 3:
{
if ((navigator.appName=='Netscape') && (navigator.appVersion.charAt(0)<'5'))
{
window.document.b.visibility="show";
window.document.m1.visibility="hide";
window.document.m2.visibility="hide";
window.document.m3.visibility="show";
return;
}
if (navigator.appVersion.charAt (0)<'5')
{
var layers=document.all.tags ("div");
}
else {
var layers=document.getElementsByTagName("div");
}
layers[0].style.visibility='visible';
layers[2].style.visibility='hidden';
layers[4].style.visibility='hidden';
layers[6].style.visibility='visible';
return;
}
}
}
</script>
<center>
<div id="b" style="position:absolute; left:30; top:30; width:500; height:170; z-index:1; visibility: hidden">
<a href="#" onmouseover="clean()" onmouseout="clean()"> </a>
</div>
<div id="h1" style="position:absolute; left:90; top:100; width:500; height:25;z-index:2; visibility: visible">
<a href="#" onmouseover="menu(1)">Meine Familie</a>
</div>
<div id="m1" style="position:absolute; left:90; top:125; width:500; height:100; z-index:3; visibility: hidden" >
<a href="#">Mama Barbara</a><br>
<a href="#">Papa Manfred</a><br>
<a href="#">Schwester Kerstin</a><br>
<a href="#">Bruder Jörg</a>
</div>
<div id="h2" style="position:absolute; left:380; top:100; width:500; height:25; z-index:4; visibility: visible">
<a href="#" onmouseover="menu(2)">Mein Freund</a></div>
<div id="m2" style="position:absolute; left:380; top:125; width:500; height:100; z-index:5; visibility: hidden">
<a href="#">Martin</a><br>
</div>
<div id="h3" style="position:absolute; left:670; top:100; width:500; height:25; z-index:6">
<a href="#" onmouseover="menu(3)">Meine Katzen</a>
</div>
<div id="m3" style="position:absolute; left:670; top:125; width:500; height:100; z-index:7; visibility: hidden">
<a href="#">Lucy</a><br>
<a href="#">Teddy</a><br>
<a href="#">Timmy</a><br>
<a href="#">Gruppenbilder</a>
</div>
</center>
</body>
</html>
Hoffe, ihr könnt mir weiterhelfen,
liebe Grüße,
Anette