Jump to content
Larry Ullman's Book Forums

Confused About Thelink And How To Get It And How To Get The Link

Recommended Posts


    <li><a href="adelaide.html" class = "caption">Adelaide</a></li>

    <li><a href="alicesprings.html" class ="caption" id="central" Alice Springsarrow-10x10.png</a></li>

    <li><a href= broomearrow-10x10.png.html" class  ="caption" id="broome" >Broome</a>


    <li><a href="cairns.html" class  ="caption" id="cairns" >Cairns</a>


    <li><a href="canberra.html" class  ="caption" id="canberra" >Canberra</a>




window.onload = rolloverInit;


function rolloverInit() {

     for (var i=0; i<document.links.length; i++) {

        var linkObj = document.links;

        if (linkObj.className) {

           var imgObj = document.getElementById(linkObj.className);

           if (imgObj) {







function setupRollover(theLink,textImage) {

     theLink.imgToChange = textImage;

     theLink.onmouseout = function() {

        this.imgToChange.src = this.outImage.src;


     theLink.onmouseover = function() {

        this.imgToChange.src = this.overImage.src;



     theLink.outImage = new Image();

     theLink.outImage.src = textImage.src;


     theLink.overImage = new Image();

     theLink.overImage.src = "images/" + theLink.id + "Text.gif";



Share this post

Link to post
Share on other sites

Hey! Beyond the post title, could you add some more context as to what you're asking here? I thiiink the answer is that "theLink" is populated when the setupRollover() function is called, once for each link, but I'm not positive that's what you're asking about. Thanks!

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.

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.


  • Create New...