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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    "I'm a newbie...be gentle"

    Greeting,

    I would like to know how to do in "javascript" that when onMouseOver an image, and the text appear in the bottom of the image?

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    What does section 2 of our posting guidelines say?

    http://www.codingforums.com/postguide.htm
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    here is an example, do you need more explanations:

    PHP Code:
    <html>
    <
    head>
    </
    head>
    <
    script language="JavaScript" type="text/JavaScript">
    function 
    objectSetup(){
    zObj = new layerSetup("text","hidden")
    }
    function 
    layerSetup(id,visibility) {
    if (
    document.getElementById){
    this.obj document.getElementById(id).style;
    this.obj.visibility visibility;
    return 
    this.obj;
    }
    }
    function 
    rollOn(){
    zObj.visibility "visible";
    }
    function 
    rollOff(){
    zObj.visibility "hidden";
    }
    </script>

    <body onload="objectSetup()">
    <a href="#" onmouseover="rollOn()" onmouseout="rollOff()">Roll over here</a><br>
    <br>
    <div id ="text">Text apears here on rollover</div>
    </body>
    </html> 
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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