Click to See Complete Forum and Search --> : Need help with DHTML / javascript project !


stark
03-16-2003, 11:23 AM
Hello all.

I'm having an idea for the construction of my website's main page and I would really need some help in choosing the right javascript / DHTML scripts and whatever else I might need.

The script I'm looking for should work like this :

The page will have an image in the middle and some links surounding it.

At first when you visit the page, a default image will show up.

Then for each individual link you - when you put the mouse over the link and BEFORE clicking it - the image will change to a different image which will correspond the content of the specific link.

So let's say I have 2 links :

1) Interviews. When you put the cursor on this link... an image with info on the latest interview will show up in the middle box.

2) Events. An image with a reference to the latest events will show up in the place where the previous image was.

I do need a script that will run fine in IE, Mozzila and Opera.

Could anyone give me some hints?

Cause I do not know what keywords I could put in search engines to find such scripts

Any help would be much appreciated.

thanx in advance

Nedals
03-16-2003, 12:48 PM
Here's a starting point. Simple add a <a..> for each image each with a different eleName and desired image names

<html><head><title></title>
<script type="text/javascript">
function chgImg(eleName,imgName) {
document[eleName].src = imgName;
}
</script>
</head>

<body bgcolor="#ffffff">
<a href="#"
onmouseover="chgImg('eleName','sampleOver.jpg')"
onmouseout="chgImg('eleName','sample.jpg')">
<img name="eleName" src="sample1.jpg" border=0></a>
</body>
</html>

Opera? not sure!

stark
03-17-2003, 03:57 AM
Thanx

I actually found this script :

http://www.htmlcodetutorial.com/images/images_famsupp_81.html

works great .

regards
stark