Results 1 to 3 of 3

Thread: Textual tooltip II - display default text?

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Textual tooltip II - display default text?

    1) Script Title: Textual tooltip II (fade into view)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/linkinfo2.htm

    3) Describe problem: A simple question that I couldn't find an answer to when searching the forums. If it has already been addressed, could someone provide a link to the proper thread?

    My testing site is here: http://www.unchartedpixels.com/iopo_design/

    I would like to have text appear when the page is loaded in the dynamic text area, by default, before the onmouseover event occurs. Anyway to accomplish this?

    Thanks so much for any help!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In this section:

    Code:
    <script language="JavaScript1.2">
    if (document.layers){
    document.write('<ilayer name="nscontainer" width="100%" height="100">')
    document.write('<layer name="fade1" width="100%" height="100">')
    document.write('</layer></ilayer>')
    }
    else
    document.write('<DIV ID="fade1"></DIV>')
    
    </script>
    add your text, it will disappear once the script is used:

    Code:
    <script language="JavaScript1.2">
    if (document.layers){
    document.write('<ilayer name="nscontainer" width="100%" height="100">')
    document.write('<layer name="fade1" width="100%" height="100">')
    document.write('</layer></ilayer>')
    }
    else
    document.write('<DIV ID="fade1">Hi, this is my default text</DIV>')
    
    </script>
    If you want to use an apostrophe or single quote characters (') they must be escaped:

    Code:
    document.write('<DIV ID="fade1">Here\'s my default text</DIV>')
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That's great!

    Is there no way to get it to go back to that default text once the user stops hovering over links?

    Thanks so much for the help John!

    Kiera

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
  •