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
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change text on Image mouseover

    For my new website, I'm trying to get a navigation bar with image links.. Now the images themselves don't change, I want the text to change, when you mouseover the image link.

    Visual representation:
    [1] [2] [3] [4]
    [ Boxed in area for blurbage ]

    Mouseover image 1, changes the blurb in the boxed in area to "Blurb 1", Mouseover image 2, changes the blurb to "blurb 2" and so on..

    the blurbs will be just a little description on what's on the page (as the images themselves don't have words)


    Any ideas?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    this should give you an idea
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script type="text/javascript">
    <!--
    function onover(what){
    document.getElementById('text').innerHTML=''+what+'';
    }
    function onout(){
    document.getElementById('text').innerHTML='';
    }
    -->
    </script>
    </head>
    
    <body>
    <a href="#" onmouseover="onover('This is some text')" onmouseout="onout()">Mouseover Me</a>
    <a href="#" onmouseover="onover('This is some other text')" onmouseout="onout()">Mouseover Me</a>
    <div id="text"></div>
    </body>
    </html>

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think that'll work. Thanks a ton!

  • #4
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just want to say thanks again. It looks great, and works great too!

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    yw glad to have helped.


  •  

    Posting Permissions

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