• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

title attribute of anchor tag and line breaks in Mozilla

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
mraible
Asked:
mraible
1 Solution
 
tomgilderCommented:
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
 
COBOLdinosaurCommented:
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
 
COBOLdinosaurCommented:
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
 
mraibleAuthor Commented:
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
 
MindphaserCommented:
Thanks for providing you solution

Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now