File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes need to create a tooltip message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "need to create a tooltip message" Watch "need to create a tooltip message" New topic
Author

need to create a tooltip message

rajkumar sound
Greenhorn

Joined: Aug 29, 2008
Posts: 11
Hi Currently iam using the following code to create a tololtip message when we move the mouse over an icon.

function showHelp() {
document.getElementById("myImage").alt = 'Help';---Not working in firefox
// document.all.elementID.alt = 'Help'; --works only with IE
}

I will call the above function in mouseover event. but the code in the first line is not working in firefox. the code in the second line works only in IE 7?

My question is "document.getElementById("myImage").alt = 'Help'" is not supported in firefox.

IF it is not supported means , what is the equivalent in firefox?

please help me.

Thanks,
RAJ
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Why aren't you just using the title attribute on the <img> tag? There's no need for any JavaScript to use the HTML-provided tooltips.

P.S. The alt attribute is not the correct way to create tooltips of any kind.
[ October 23, 2008: Message edited by: Bear Bibeault ]
rajkumar sound
Greenhorn

Joined: Aug 29, 2008
Posts: 11
Great!!!1


It really solves my problem

Thanks,
RAJ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need to create a tooltip message