Results 1 to 6 of 6

Thread: script to make a link list onMouseOver show a thumbnail in the same spot on webpage

  1. #1
    Join Date
    Mar 2010
    Location
    Cleveland, OH
    Posts
    8
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question script to make a link list onMouseOver show a thumbnail in the same spot on webpage

    Hello folks,

    I'm looking for a script that will make a link list with onMouseOver show a thumbnail in the same spot on webpage. See example here. Thank you so much for taking the time to answer.

    Best,

    Dana O.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Any rollover/mouseover image script should work.

    Here is how to change it:
    1. rollover images are applied to IMAGES-- apply it to the links instead. (<a> tag instead of <img> tag.)
    2. There is no image at all of no link is hovered over. You can either leave a default image (or a "blank"-- white-- image), or you can use display:none when no link is active (onmouseout, and by default). Basically just add that action to the javascript function.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    DanaOldfather (04-01-2010)

  4. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    djr hit it on the head (as per usual) and I am a day late and a dollar short... again.

    but, open forum right?

    Have a look at Stu Nichol's CSS Play. Some GREAT menus there, and easily followed and adapted to your purpose.

    For example the pop up image menu found here Instead of having the images appear with borders and such in different places, find the spot on your page and have them all appear in the same spot.

    Or.. if you want a JS answer look at how the linked page you gave us does it:

    Code:
    <script language="javascript">
    <!-- 
    
    function showImage(image) {
    	document.getElementById('imageC').src = image;
    }
    
    function hideImage() {
    	document.getElementById('imageC').src = 'images/spacer30.gif';
    }
    
    //-->
    </script>
    The above goes in the <head> section... the following goes on the links:

    Code:
    <a href="gallery_of_artists/contemporary/bergholz.htm">david bergholz</a></span><br>
    			<span id="choice3" style="cursor:hand" onmouseover="showImage('images/gallery_of_artists/tn/TN146_Biro.jpg');" onmouseout="hideImage();">
    Then have a div or such named id="imageC" where you want the images to appear.

    The page you referenced does it in table form, with the blank image as the last TD as such:

    Code:
    <td width="146" valign="top" height="378"><span id="boxdescription">
    
    			<img src="images/spacer30.gif" id="imageC" width="146" height="146"></span> </td>
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    DanaOldfather (04-01-2010)

  6. #4
    Join Date
    Mar 2010
    Location
    Cleveland, OH
    Posts
    8
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much! I'm really a beginner, and I really appreciate the time you took to break out all that code. I did view source on that page but wasn't sure if I was missing some scripting somewhere. One other question - the "images/spacer30.gif" is just a blank box that I will need to make, in say fireworks, and insert into my table right? If so, I think I get it. Thanks again!

    Dana O.

  7. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    That is correct. It is just a place holder so there is content there. That way the page doesn't jump and re-size when an image is inserted or removed via the hover.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #6
    Join Date
    Apr 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hi

    For example the pop up image menu found here Instead of having the images appear with borders and such in different places, find the spot on your page and have them all appear in the same spot.

    Seo tips

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
  •