• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need to create a tooltip message

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great!!!1


It really solves my problem

Thanks,
RAJ
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic