Solved

title attribute of anchor tag and line breaks in Mozilla

Posted on 2002-07-03
5
784 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 50 total points
ID: 7148886
Thanks for providing you solution

Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Bootstrap 3 and Angular 2 12 52
.php tree directory? 5 55
Problem with a CSS in a page 2 26
Form Submit falis 6 25
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

911 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

16 Experts available now in Live!

Get 1:1 Help Now