SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    933
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Arrow Preload image? I'm stuck...

    Hi i have done this before on my personal website czone01.com

    Now I'm applying this to my client site http://www.capitolpreservation.com
    and now I'm really, really stuck... I followed it everything from my site.
    and when i hover the mouse on the home pic it doesn't show the 2nd image.

    here --> http://www.capitolpreservation.com/temp/

    Why is this?

    THANK YOU, THANK YOU, THANK YOU VEEERRRRYYY MUUUUCHHHHH IN ADVANCE!!!!

    i tried it maybe 20 times, can some one please show me the way. i'm lost...

  2. #2
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    933
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Arrow ok here is the code

    Code:
    <script type="text/javascript">
    <!--
    // preload images
    	homeOff = new Image()
    	homeOff.src = "images/iconhome.jpg"
    	homeOn = new Image()
    	homeOn.src = "images/iconhome2.jpg"
    
    function rollOver (imgName)
    {
        document.images[imgName].src =
          eval(imgName + "On.src")
    }
    function rollOut (imgName)
    {
        document.images[imgName].src =
          eval(imgName + "Off.src")
    }	
    //-->
    </script>
    inside the body...

    Code:
    			
    <div id="homediv" style="position:absolute; left:171px; top:0px; width:70px; height:169px; z-index:2;">
    				<a HREF="http://www.capitolpreservation.com" onMouseover="rollOver('homeholder')" onMouseout="rollOut('homeholder')">
    					<img src="images/iconhome.jpg" name="homeholder" width="70" height="200" id="homeholder" border="0"/>
    				</a>
    
    </div>
    i'm hoping someone will help me.

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    <img src="images/iconhome.jpg" name="homeholder" width="70" height="200" id="homeholder" border="0"/>

    onMouseover="rollOver('homeholder')"

    homeOn = new Image()
    homeOn.src = "images/iconhome2.jpg"

    What do you think the problem is?
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    933
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Ha, ha, ha

    You make me laugh

    I'm so dumb.


    Thanks a zillion times bro. i got it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •