#1
  1. No Profile Picture
    chattan
    Guest
    Devshed Newbie (0 - 499 posts)
    I am putting together a website for a photographer friend, and he would like a description (one or two sentences) displayed when the mouse moves over a thumbnail. He wants this description to appear in the bottom left corner of the screen with the thumbnails to the right of this. As there will be about 20+ thumbnails per category, i've had to make this a separate frame. So, my question is:

    How can I display text is a different frame when the mouse passes over an image?

    I can do it in the same frame using something like

    <SCRIPT LANGUAGE = "JavaScript">
    /* Show an object */
    function showObject(object) {
    object.visibility = VISIBLE;
    }
    /* Hide an object */
    function hideObject(object) {
    object.visibility = HIDDEN;
    }
    </SCRIPT>

    and later on

    <a href= ... onmouseover="showObject(desc1)"
    onmouseout="hideObject(desc1)"> ... </a>

    (That's using an IE style class for the desc, Navigator I deal with as

    /* Simple version detection */
    var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);

    /* They can be used in place
    of hidden and visible because on occasion Navigator has problems with the two */
    var HIDDEN = (isNS) ? 'hide' : 'hidden';
    var VISIBLE = (isNS) ? 'show' : 'visible';

    /* Create shortcut variables for different absolutely positioned elements */
    var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
    etc.
    )

    Is there a simple variation on these themes that I can use, or do I need a total re-write?


    ------------------
    J K-C
  2. #2
  3. No Profile Picture
    jayuen
    Guest
    Devshed Newbie (0 - 499 posts)
    this worked for me:

    suppose the frame that you wanted to load s called "one" and the html page you want to load into that frame is called one.html.

    onMouseOver="parent.one.location='one.html'"
  4. #3
  5. No Profile Picture
    dahamsta
    Guest
    Devshed Newbie (0 - 499 posts)
    Unfortunately, that will require you to have a page for each thumbnail, although this could be overcome using a large page with an anchored area for each thumbnail:

    onMouseOver="top.frames[1].location.href='page.htm#picnum'"

    I've been thinking about this though, and I'm wondering if you could use document.write? I'm not though, JavaScript security might prevent it. Try this:

    onMouseOver="top.frames[1].document.write('Text to be displayed here'); return true"

    adam

Similar Threads

  1. DIV scroll with image scroll buttons
    By CarlosFratini in forum HTML Programming
    Replies: 5
    Last Post: May 21st, 2004, 09:58 AM
  2. Displaying Contents of text files
    By carol2003 in forum C Programming
    Replies: 4
    Last Post: January 6th, 2004, 10:44 AM
  3. hovering over text in small frame
    By idologic_aw in forum HTML Programming
    Replies: 3
    Last Post: December 24th, 2003, 02:27 PM
  4. Setting focus on frame with only Text
    By babarahsan in forum HTML Programming
    Replies: 0
    Last Post: October 24th, 2003, 07:35 AM
  5. sql problem
    By rajensama in forum MySQL Help
    Replies: 6
    Last Post: December 23rd, 2001, 03:27 PM

IMN logo majestic logo threadwatch logo seochat tools logo