Solved

title attribute of anchor tag and line breaks in Mozilla

Posted on 2002-07-03
5
820 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

630 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