• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

How can i do with an Images ....

How can i do this?
I put an image on my page and i want, when the user move the mouse over, to change to another.

My english is horrible!!  sorry
Thank for your help
0
ale2000
Asked:
ale2000
1 Solution
 
messentaryCommented:
Place this within the head tags of the HTML:

<!--

function change(picture) {
document.theimg.src = picture
}
function change2(picture) {
document.theimg2.src = picture
}
function change3(picture) {
document.theimg3.src = picture
}
function change4(picture) {
document.theimg4.src = picture
}
function change5(picture) {
document.theimg5.src = picture
}  
//-->
</script>


Now place this where your image is.  I'm giving you code that will activate a hyperlink:

<a href="url.htm" onMouseOver="change('pic1.jpg')" onMouseOut="change('pic2.jpg')"><img SRC="pic2.jpg" NAME="theimg" BORDER="0" HSPACE="0" WIDTH="85" HEIGHT="26"></a>

<a href="url2.htm" onMouseOver="change2('pic3.jpg')" onMouseOut="change2('pic4.jpg')"><img SRC="pic4.jpg" NAME="theimg" BORDER="0" HSPACE="0" WIDTH="85" HEIGHT="26"></a>

<a href="url3.htm" onMouseOver="change3('pic5.jpg')" onMouseOut="change3('pic6.jpg')"><img SRC="pic6.jpg" NAME="theimg" BORDER="0" HSPACE="0" WIDTH="85" HEIGHT="26"></a>

<a href="url4.htm" onMouseOver="change4('pic7.jpg')" onMouseOut="change4('pic8.jpg')"><img SRC="pic8.jpg" NAME="theimg" BORDER="0" HSPACE="0" WIDTH="85" HEIGHT="26"></a>

<a href="url5.htm" onMouseOver="change5('pic9.jpg')" onMouseOut="change5('pic10.jpg')"><img SRC="pic10.jpg" NAME="theimg" BORDER="0" HSPACE="0" WIDTH="85" HEIGHT="26"></a>



0
 
kodiakbearCommented:
Fixed the -1 problem on this question.
Escrow points corrected.

kb
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now