AboutJim Stiles Expertise I am a Certified Internet Web Designer with eighteen years experience in creating, developing and maintaining both personal and corporate web sites. I have an extensive working knowledge of HTML, DHTML, CSS and JavaScript. While I specialize in CSS, DHTML and JavaScript functions, my main topic is assisting persons and businesses with the overall development and outlay of their web sites. I also have 20 years of experience in Law Enforcement and Corrections. I have an extensive knowledge of all Microsoft Office applications, Windows OS 95 through XP, as well as Microsoft Exchange server 5.5 and Outlook Web Access. I am also certified in Video Teleconferencing, Network Systems Administration and Cisco CCND.
Experience I have many various certifications from Microsoft and Cisco as well as individual course studies in web site development and advanced database development. I have developed and currently maintain several corporate web sites.
Question Hi Jim:
I was wondering if you could help me. Firstly, thank you so much for all the information you provide at allexperts.com.
It has come in amazingly handy and has helped so much.
My question is a javascript coding question that I am absolutely desperate for an answer for.
I have a two images, image1.gif and image2.gif. When you roll over image1.gif it becomes newimage1.gif and image2.gif becomes newimage2.gif. So you roll over one and both change. No problem there. The only other thing I want to do is to get one of the new images - newimage2.gif - to be an image map.
The code I have now is:
<head>
<SCRIPT language="JavaScript">
<!--
if (document.images) {
pic1on = new Image(226, 93);
pic1on.src = "images/newimage1.gif";
pic2on = new Image(684, 296);
pic2on.src = "images/newimage2.gif";
}
Do you know what I would have to add to the code to make this happen?
If you have any idea and would be able to provide me with the information it would be GREATLY, GREATLY appreciated. Again, I am desperate.
Thank you for listening and thank you again for all the good work you do.
Sincerely,
Ari Strauch
Answer I would probably place your image map inside a div. Then, show/hide the div using javascript. I have included two links showing examples for showing and hiding div containers.