SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: onmouseover

  1. #1
    SitePoint Member cusoon4's Avatar
    Join Date
    Aug 2003
    Location
    Maryland
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool onmouseover

    I have 6 images that are in 2 rows by 3 long. in the middle is
    a large text box....
    and make these images hyperlink when you click on them
    No problem there so far

    How do I write the code to make the text change (showing examples
    of what they would see if they click in the image link) in that
    text box when the user puts their mouse "onmouseover"
    on the image. i assume I would have to build a table.


    x text x

    x text x

    x text x


    Thanks you in advance
    Michael

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Michael,

    Short answer: through dHTML's innerHTML property and a mouseover event.
    Code:
    <a href="#" onmouseout="document.getElementById('div1').innerHTML = ''" onmouseover="document.getElementById('div1').innerHTML='GrassBlade'"><img src=""http://members.aol.com/grassblad/images/grassAvatar.jpg></a>
    <div id="div1"></div>
    since I cannot visual this:
    Code:
    ...3 long. in the middle is a large text box
    a longer answer would require some code on your part.

    If interested, see the 'dHTML: an Introduction' script/tutorial at my site (GrassBlade)
    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


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
  •