Solved

Displaying tooltip which contains new line character for <a> in Netscape failed

Posted on 2004-03-29
12
972 Views
Last Modified: 2012-06-21
Hi all,

I have page1 including a textarea to input data. When users input data into this textarea with content:
aaaa
bbbb
In the page2, I get this value and display it as a tooltip of <a>. However when users mouse over on <a>, tooltip displays between aaaa and bbbb is a rectangle.
It only occurs on Netscape.

Thanks for your helps.
 
0
Comment
Question by:dtdphuc
  • 4
  • 3
  • 2
  • +1
12 Comments
 
LVL 17

Expert Comment

by:dorward
Comment Utility
Different browsers handle line breaks in the middle of title attributes differently. There is no work around AFAIK so you should avoid placing line breaks in title attraibute values.
0
 

Author Comment

by:dtdphuc
Comment Utility
Which ways can I fix it? I must fix it (can not avoid).
0
 
LVL 17

Expert Comment

by:dorward
Comment Utility
As far as I know, and as I said before, there is no fix.
0
 

Author Comment

by:dtdphuc
Comment Utility
Is this a browser's bug?
0
 
LVL 17

Expert Comment

by:dorward
Comment Utility
Perhaps, you would have to check with the specifcation to be sure. It might be that line breaks should be treated as white space for the attribute value of title.

However, I think that those two browsers actually get it right. One can show multiline tooltips and does so, the other can't and shows the new line as an unprintable character.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 8

Expert Comment

by:HaydnH
Comment Utility
Please could you post a link to the code, or the code itself.

Thanks,

Haydn.
0
 
LVL 17

Expert Comment

by:dorward
Comment Utility
title="aaaa
bbbb"

I assume.
0
 
LVL 12

Expert Comment

by:ahosang
Comment Utility
can't test now but you could try using the entity:
&#10;
to act as the line break
0
 
LVL 8

Expert Comment

by:HaydnH
Comment Utility
ahosang,

that will only work with IE, the 2 rectangles shown in the tooltip when a new line is found is the same as &#10;&#13;

Haydn.
0
 
LVL 8

Accepted Solution

by:
HaydnH earned 500 total points
Comment Utility
Ahh... it's a Mozilla/Netscape Bug I'm afraid - first 1 I've found with the latest Mozilla release (grrrr!), see:

    http://bugzilla.mozilla.org/show_bug.cgi?id=67127

Looks like they're making progress on the patch so I guess it will be finished by the next release.

Haydn.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now