Solved

title attribute of anchor tag and line breaks in Mozilla

Posted on 2002-07-03
5
779 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for providing you solution

Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

743 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

8 Experts available now in Live!

Get 1:1 Help Now