Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
dianefoster

Can't Get The Images To Rollover When Mouseover Links

Recommended Posts

<li><a href = "adelaide.html"   id ="ade" a.mouseout ="function()" a.mouseover ="function()" >Adelaide</a></li>
    <li><a href="alicesprings.html"  class ="caption" id ="alicesprings" >Alice Springs</a></li>
    <li><a href="broome.html"   >Broome</a>
    </li>
    <li><a href="cairns.html" >Cairns</a>
    </li>
    <li><a href="canberra.html"  >Canberra</a>
    </li>
    
  </ul>
</div>
<div id ="div13">
<ul>
<li><a href ="darwin.html">Darwin</a></li>
<li><a href ="goldcoast.html">Gold Coast</a></li>
<li><a href ="hobart.html">Hobart</a></li>
<li><a href ="regionalcities.html">Regional Cities</a></li>
</ul>
</div>
<div id ="div15">
<ul>
<li><a href ="bluemountains.html">Blue Mountains</a></li>
<li><a  href ="byronbay.html">Byron Bay</a></li>
<li><a href ="flindersranges.html">Flinders Ranges</a></li>
<li><a href ="frazerisland.html">Frazer Island</a></li>
<li><a href ="freycinet.html">Freycinet</a></li>
<li><a href ="gippsland.html">Gippsland</a></li>
<li><a href ="kakadu.html">Kakadu</a></li>
</ul>
</div>
<div id ="div16">
<ul>
<li><a href ="namadjinationalpark.html">Namadji Park</a></li>
<li><a href ="ningaloo.html">Ningaloo</a></li>
<li><a href ="tasmanianwilderness.html">Tasmanian Wilderness</a></li>
<li><a href ="australianalps.html">Australian Alps</a></li>
<li><a href ="kimberley.html">Kimberley</a></li>
<li><a href ="margaretriver.html">Margaret River</a></li>
</ul>
</div>
<div id ="div14">
    <img src="images/australiaMap.jpg"  id ="img9" alt=""/> </div>
</div>
</div>

// JavaScript Document
"use strict";
window.onload =rolloverInit;
function rolloverInit() {
for(var i =0;i<document.links.length;i++)
{
var linkObj = document.links;
if(a.caption) {
var imgObj = document.getElementByClassName(a.caption);
if(australiaMap) {
setupRollover(a,australiaMap);
}
}
}
}
function setupRollover(a,australiaMap) {
a.imgToChange = australiaMap;
a.onmouseout =function() {
this.adelaide5.src  = this.australiaMap.src;
}
a.onmouseover = function() {
this.australiaMap.src = this.adelaide5.src;
}
a.outImage = new Image();
a.australiaMap.src ="images/" + "australiaMap.jpg";
a.overImage = new Image();
a.adelaider5.src  ="images/" + a.ade + "adelaide5.jpg";
}

 Dear Larry I got this script from Visual Quickstart Guide  9th   Edition by Tom Negrino  on page 99 I really appreciate you replying to me. Cheers Diane

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...