Results 1 to 5 of 5

Thread: line breaks in dhtmltooltip

  1. #1
    Join Date
    Apr 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default line breaks in dhtmltooltip

    Code:
    <html>
    
    <head>
    <style type="text/css">
    
    #dhtmltooltip{
    
    OMITTED
    
    }
    
    </style>
    </head>
    
    <body>
    
    <div id="dhtmltooltip"></div>
    
    <script type="text/javascript">
    
    /***********************************************
    * Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    - OMITTED -
    
    document.onmousemove=positiontip
    
    </script>
    
    
    <a href="http://www.javaSciprtKit.com" 
    onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials', 'yellow', 250)";
    onMouseout="hideddrivetip()">LINK1</a> 
    
    <a href="http://www.javaSciprtKit.com" onMouseover="ddrivetip('JavaScriptKit.com 
    
    JavaScript tutorials', 'yellow', 250)";
    onMouseout="hideddrivetip()">LINK2</a> 
    
    </body>
    </html>
    The code above is from http://www.dynamicdrive.com/dynamici...tmltooltip.htm .

    On the bottom of the code above there are two links, i.e. link1 and link2.

    Link1 works fine but Link2 which has line breaks in the text doesn't work fine.

    Is there any way to make it fine with linebreaks?
    Last edited by joon; 01-12-2009 at 01:06 PM.

  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

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    This is because you have to concatenate new lines in:
    Code:
    <a href="http://www.javaSciprtKit.com" 
    onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials', 'yellow', 250)";
    onMouseout="hideddrivetip()">LINK1</a> 
    
    <a href="http://www.javaSciprtKit.com" onMouseover="ddrivetip('JavaScriptKit.com'+
    
    'JavaScript tutorials', 'yellow', 250)";
    onMouseout="hideddrivetip()">LINK2</a>
    That should work.
    If you were aiming to make line breaks, use <br />.
    Jeremy | jfein.net

  4. #4
    Join Date
    Apr 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Please post a link to the page on your site that contains the problematic code so we can check it out.
    I like to put the code into http://dot.kr .
    Since my problem of the code above is not solved, I didn't put the code into http://dot.kr yet.

    By the way, my test code of it is at http://dot.kr/x-test/09.cfm .



    Quote Originally Posted by Nile View Post
    If you were aiming to make line breaks, use <br />.
    <br> works. Thank you.
    Last edited by joon; 01-12-2009 at 05:11 AM.

  5. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Glad to help Joon!
    It seems your topic is solved... Please set the status to resolved.. To do this:
    Go to your first post ->
    Edit your first post ->
    Click "Go Advanced" ->
    Then in the drop down next to the title, select "RESOLVED"
    Jeremy | jfein.net

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
  •