SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot trekmp's Avatar
    Join Date
    Dec 2005
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display image from Select box

    I've got a dropdown menu that displays a list of images, what I would like to do is when I move the mouse over a name but do not click it, display the image on my screen. Works like a rollover in other words.

    Is this possible if it is how?
    Why do we exist? What is our purpose?
    >H2O Developments
    >USS Endeavour
    >Hosted@Servage

  2. #2
    SitePoint Enthusiast Tygatur's Avatar
    Join Date
    Apr 2006
    Location
    Germany
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just in case: This is not possible with the <select> Tag

    HTML Code:
    <img src="info.gif" id="previewimage" />
    <script type="text/javascript">
    function imginf(_src){document.getElementById('previewimage').src=_src;}
    </script>
    
    <div onmouseover="imginf('pic1.jpg')">one</div>
    <div onmouseover="imginf('pic2.jpg')">two</div>
    <div onmouseover="imginf('pic3.jpg')">three</div>
    If you don't know what eventhandlers are, look it up.
    to code or not to code ?
    that's too much of a question for a signature.


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
  •