Results 1 to 2 of 2

Thread: Javascript Gone Bad Help!

  1. #1
    alright im trying to make a image swap here and it wont work!!!
    Code:
    <script language="Javascript1.1">
    function yaImgChange(imgnum,imgsrc) {
    document.images[11].src = img1.gif;
    }
    </script>
    <a href="javascript:nothingMuch();"
     onmouseover="javascript:yaImgChange(11,'img1.gif');"
     onmouseout="javascript:yaImgChange(11,'img2.gif');"> <img
     src="img1.gif"></a>
    the code is located here. Please help me out!!!! I can't get it to work!

  2. Internet, Programming and Graphics   -   #2
    sparsely's Avatar °¤°¤°¤°¤°¤°¤°
    Join Date
    Dec 2002
    Location
    static hum
    Posts
    3,486

    you really don't need all that for just a mouseover...you can do it all in the anchor & img tags.
    like:
    Code:
    <a href="#" onmouseover="document.home.src='images/l1_2.gif';" onmouseout="document.home.src='images/l1.gif';"><img name="home" alt="Welcome" src="images/l1.gif" /></a>
    the &#39;home&#39; in document.home.src is just what you name the <img>, and the src of it will be the &#39;over&#39; image.

    this post is guaranteed 100% parrot-free

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
  •