Dear all,
I am a very novice javascriper and have cobled this together from
various places. I didnt expect it to work but hopefully will give you
an idea of what i want to achive.
I need 5 links that when you mouseover it, it displays the corisponding
div and separate image. When you mouse out it goes back to the defult.
first link.
I hope you get the idea.
Please help as i will never mange this on my own
Many thanks
Alex Kemsley
<html>
<head>
<title></title>
<script type="text/javascript">
function doStuff(el) {
document.all.tu bimage.src=el+" .jpg";
document.getEle mentById.el.sty le.display="blo ck";
el.onmouseout=f unction() {
document.all.tu bimage.src="mon aco.jpg";
document.getEle mentById.el.sty le.display="non e";
}
}
</script>
</head>
<body>
<p>
<img src="monaco.jpg " alt="" id="tubimage" /></p>
<a onmouseover="do Stuff(monaco)"> Monaco</a><br />
<a onmouseover="do Stuff(sttropez) ">St Tropez</a<br />
<a onmouseover="do Stuff(barclona) "Barcelona</a><br />
<a onmouseover="do Stuff(milan)">M ilan</a><br />
<a onmouseover="do Stuff(prague)"> Prague</a><br />
</p>
<div id="monaco" style="display: none">
monaco text
</div>
<div id="sttropez" style="display: none">
sttropez text
</div>
<div id="barcelona" style="display: none">
barclona text
</div>
<div id="milan" style="display: none">
milan text
</div>
<div id="prague" style="display: none">
prague text
</div>
</body>
</html>
I am a very novice javascriper and have cobled this together from
various places. I didnt expect it to work but hopefully will give you
an idea of what i want to achive.
I need 5 links that when you mouseover it, it displays the corisponding
div and separate image. When you mouse out it goes back to the defult.
first link.
I hope you get the idea.
Please help as i will never mange this on my own
Many thanks
Alex Kemsley
<html>
<head>
<title></title>
<script type="text/javascript">
function doStuff(el) {
document.all.tu bimage.src=el+" .jpg";
document.getEle mentById.el.sty le.display="blo ck";
el.onmouseout=f unction() {
document.all.tu bimage.src="mon aco.jpg";
document.getEle mentById.el.sty le.display="non e";
}
}
</script>
</head>
<body>
<p>
<img src="monaco.jpg " alt="" id="tubimage" /></p>
<a onmouseover="do Stuff(monaco)"> Monaco</a><br />
<a onmouseover="do Stuff(sttropez) ">St Tropez</a<br />
<a onmouseover="do Stuff(barclona) "Barcelona</a><br />
<a onmouseover="do Stuff(milan)">M ilan</a><br />
<a onmouseover="do Stuff(prague)"> Prague</a><br />
</p>
<div id="monaco" style="display: none">
monaco text
</div>
<div id="sttropez" style="display: none">
sttropez text
</div>
<div id="barcelona" style="display: none">
barclona text
</div>
<div id="milan" style="display: none">
milan text
</div>
<div id="prague" style="display: none">
prague text
</div>
</body>
</html>
Comment