Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

title attribute of anchor tag and line breaks in Mozilla

Posted on 2002-07-03
5
Medium Priority
?
828 Views
Last Modified: 2008-03-06
I have the following code in an HTML page:

<a href="javascript:document.location.reload()"
                onmouseover="window.status=''; return true"
                onmouseout="window.status=''; return true"
                title="Refresh this page.
This allows you to create notes for the current
item you are viewing. Don't forget to save
your current note.">
            <img src="/images/iconRefresh.gif" class="refreshIcon" alt="Refresh this page.
This allows you to create notes for the current
item you are viewing. Don't forget to save
your current note."></img>

This works GREAT for IE 6 (Win/Mac) but on Mozilla (Win/Mac), little icons appear where there should be line breaks and the whole message is not displayed.

So in Mozilla, the tooltip ends up looking similar to:

Refresh this page.*This allows you to create notes for the current*item you are vie...

Is there a workaround for this on Mozilla?

Thanks,

Matt

0
Comment
Question by:mraible
5 Comments
 

Expert Comment

by:tomgilder
ID: 7130861
This question actually shows up bugs in both IE and Mozilla. According to the HTML 4.01 specification, your title's line breaks (presuming, of course, that they are Windows line-breaks - a CR followed by a LF) should be replaced with spaces - not displayed as line breaks within a tooltip, or any other charecter.

There is no way (that I, or some Mozilla developers I spoke to know of) to force Mozilla into displaying multiline tooltips.

For Mozilla bugs on this, see http://bugzilla.mozilla.org/show_bug.cgi?id=67127 and http://bugzilla.mozilla.org/show_bug.cgi?id=47078.

For more information on the standards side of things, see:
  * The title attribute - http://www.w3.org/TR/html401/struct/global.html#h-7.4.3
  * The CDATA type (which is what title is) - http://www.w3.org/TR/html401/types.html#h-6.2


Hope that helps!
Cheers
Tom
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7131933
Tom,

Welcome to experts-exchange.  Please read the guidelines for comments and answers.  The questioner is aware of the  problem and has asked for a workaround.  All you have given them is the technical reason for the bug. That does no address the question or answer it.  By submitting as an answer you have removed the question from the active list, which will reduce participation by other experts and limit the probability of finding a workaround.

If you observe the top-experts on the site you will note that they submit comments.  The answer button us only used to submit definitive answers.  Some users will be insulted if you submit an "answer" that does not completely solve their problem.

You may find some of the threads in the New User topic area, helpful as you are learning how the site works:
http://www.experts-exchange.com/new_users/

Please continue to participate in the threads, but use comments unless you are providing a definitive answer.

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7131946
Matt,

I think you are going to be stuck with using a tooltip script.  There are some here that might help:  http://www.dynamicdrive.com/dynamicindex5/index.html

If you need elp adapting them let us know.

Cd&
0
 
LVL 1

Author Comment

by:mraible
ID: 7148454
I have up on using the title attribute and will ask that my points be refunded.

None of these scripts worked in Mozilla:

http://www.dynamicdrive.com/dynamicindex5/index.html

and the help tooltip from http://www.webfx.nu doesn't work in IE5...

So I just created a div that looks like a tooltip and hide/show when the user mouses over the link.
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 200 total points
ID: 7148886
Thanks for providing you solution

Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

782 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