Jeg har brugt det meste af dagen til at prøve at lave Mouse over i min menu
bar.
Jeg kan ikke få det til at virke i FP2000 vil i prøve at se hvad det er jeg
gør galt?
Koden ser ud som følger:
Indsættes i header:
<script language="JavaScript">
<!--
if (document.images) {
img1on = new Image();
img1on.src = "../a1.gif";
img1off = new Image();
img1off.src = "../1.gif";
img2on = new Image();
img2on.src = "../a2.gif";
img2off = new Image();
img2off.src = "../2.gif";
img3on = new Image();
img3on.src = "../a3.gif";
img3off = new Image();
img3off.src = "../3.gif";
img4on = new Image();
img4on.src = "../a4.gif";
img4off = new Image();
img4off.src = "../4.gif";
img5on = new Image();
img5on.src = "../a5.gif";
img5off = new Image();
img5off.src = "../5.gif";
img6on = new Image();
img6on.src = "../a6.gif";
img6off = new Image();
img6off.src = "../6.gif";
img7on = new Image();
img7on.src = "../a7.gif";
img7off = new Image();
img7off.src = "../7.gif";
img8on = new Image();
img8on.src = "../a8.gif";
img8off = new Image();
img8off.src = "../8.gif";
}
function swapImg() {
if (document.Img) {
for (var i=0; i<swapImg.arguments.length; i+=2) {
document[swapImg.arguments[i]].src = eval(swapImg.arguments[i+1] +
".src");
}
}
}
// -->
</script>
indsættes i bodyén:
<a href="main.htm" target="main"> onMouseOver="swapImg('img1', 'img1on')"
onMouseOut="swapImg('img1', 'img1off')"><img name="img1" src="../1.gif"
border=0></a>
<a href="om_mig_selv.htm"target="main"> onMouseOver="swapImg('img2',
'img2on')" onMouseOut="swapImg('img2', 'img2off')"><img name="img2"
src="../2.gif" border=0></a>
<a href="Dagbog.htm" target="main"> onMouseOver="swapImg('img3', 'img3on')"
onMouseOut="swapImg('img3', 'img3off')"><img name="img3" src="../3.gif"
border=0></a>
<a href="studieture.htm" target="main"> onMouseOver="swapImg('img4',
'img4on')" onMouseOut="swapImg('img4', 'img4off')"><img name="img4"
src="../4.gif" border=0></a>
<a href="erindringer.htm" target="main"> onMouseOver="swapImg('img5',
'img5on')" onMouseOut="swapImg('img5', 'img5off')"><img name="img5"
src="../5.gif" border=0></a>
<a href="links.htm" target="main"> onMouseOver="swapImg('img6', 'img6on')"
onMouseOut="swapImg('img6', 'img6off')"><img name="img6" src="../6.gif"
border=0></a>
<a href="gastebog.htm" target="main"> onMouseOver="swapImg('img7',
'img7on')" onMouseOut="swapImg('img7', 'img7off')"><img name="img7"
src="../7.gif" border=0></a>
<a href="kalender.htm" target="main"> onMouseOver="swapImg('img8',
'img8on')" onMouseOut="swapImg('img8', 'img8off')"><img name="img8"
src="../8.gif" border=0></a>
Med venlig hilsen
Poul
www.pss.esenet.dk