Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question "On Mouseover" picture display problem

    First of all, I am very new to this and I am trying to teach myself...I may not know all the correct jargon with which to ask my question, but here's the issue.

    Situation: I have tried to create some buttons which "dissolve" into another picture when the mouse pointer is on top of them. Then they "dissolve" back to the original graphic.

    Problem: The code appears to function properly, as the "dissolve" happens. The original graphic is there. However, when I put the mouse pointer on the picture, it "dissolves" into that little white box with the red 'x' inside...then when I move the mouse out, it "dissolves" back to the original graphic.

    Source: There are two different sources from which I got the code to do this. One of them you copy and fill in the paths to the graphics used. The other was the javascript kit. On the javascript kit, the demo of my selected code was functioning perfectly. But when I put it into my html file, it did the same thing as the first code I copied...I have also triple checked (several times) that the paths are correct for my pictures. Also I pasted the code into the correct places...For weeks...

    I am suspecting that I am using an incompatible HTML editor. Or perhaps, in my newbieness, I am not supposed to use an HTML editor at all! I have never had any problems viewing things on the browser, so I believe that is not where the problem is. I am not sure. For the sake of space I will not post the code yet. Please let me know if further information is needed to answer my question.

    I appreciate any assistance provided on this most frustrating matter. I've been trying to figure it out on my own for weeks...

    Thanks,
    Virginia

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I'll just go ahead and ask the obvious so that the javascript gurus won't have to. Can we please see your code and possibly a link to the page? That will help us out immensely.
    Last edited by Antoniohawk; 06-01-2004 at 11:25 PM.

  • #3
    New to the CF scene
    Join Date
    May 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for your reply! Here is the code for the page. It is not online yet, all paths are to the hard drive. I preview it by opening it in my browser.
    Thanks again!


    <HTML>
    <HEAD>
    <TITLE>TITLE HERE</TITLE>
    <META NAME="GENERATOR" CONTENT="Cool HTML 1.0">
    <META NAME="FORMATTER" CONTENT="Cool HTML 1.0">
    <script language="javascript1.1">
    <!--

    /*Code generated by the onMouseover whipper
    Visit http://javascriptkit.com for more info*/

    c939=new Image(100,30)
    c939.src="C:\My Documents\My Pictures\Backgrounds\Tada\yellow_weave_on.jpg"
    c321=new Image(100,30)
    c321.src="C:\My Documents\My Pictures\Backgrounds\Tada\yellow_weave_off.jpg"
    //-->
    </script>
    <script>
    <!--
    function filter(imagename,objectsrc){
    if (document.images)
    document.images[imagename].src=eval(objectsrc+".src")
    }
    //-->
    </script>
    </HEAD>

    <BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff"
    VLINK="#0000ff" ALINK="#0080ff">
    <a href="yoururl.htm"
    onmouseover="filter('c458','c321')"
    onmouseout="filter('c458','c939')">
    <img src="C:\My Documents\My Pictures\Backgrounds\Tada\yellow_weave_on.jpg" name="c458" border=0 width=100 height=30></a>


    </BODY>
    </HTML>

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try changing this line: document.images[imagename].src=eval(objectsrc+".src")

    To this: document.images[imagename].src=objectsrc.src

  • #5
    New to the CF scene
    Join Date
    May 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I haven't been here in a while but thank you for your help!


  •  

    Posting Permissions

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