www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] image changing problem

  1. #1
    Join Date
    Apr 2008
    Posts
    10

    resolved [RESOLVED] image changing problem

    hello,

    i want to change the image when the mouse is placed over an image....

    i will give my trials....

    the problem is that i am not getting the next image..it simply displays the message.....

    <script type="text/javascript">
    function mouseOver()
    {
    document.b1.src ="d:\pic\boom.gif";
    }
    function mouseOut()
    {
    document.b1.src ="d:\pic\smile.gif";
    }
    </script>
    </head>

    <body>

    <img border="0" alt="Visit W3Schools!"
    src="d:\pic\smile.gif" name="b1"
    onmouseOver="mouseOver()"
    onmouseOut="mouseOut()" />

    </body>
    </script>


    plz help me to solve this problem....
    is there any error in the code....or the problem is with browser?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Use forward slash and reference relative to the folder the document is in. Don't use different drives; browsers don't really understand them.
    Code:
    document.b1.src ="pic/smile.gif"
    The document and the folder pic are in the same root folder
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Apr 2008
    Posts
    10
    it really works!!

    thanks for ur suggestion

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles