views:

347

answers:

3

Hi everyone!!

I have a div element that when I click on it on IE, it shows me a clue tip. But, when I click in Firefox (or Chrome), this tip doesn't shów at all.

I have firebug installed but I dont't have good experience on using it.

With firebug, can I know why this tip isn't showing?? How can I do that?

Thanks!!

A: 

Check the javascript error console after clicking on the div in firefox.

Tools > Error console

This should give you the line of code causing your error and a description of the error.

Brian R. Bondy
I put an alert that opens when this div is clicked. It works on IE, but FF doesn't show nothing. I've tried to insert a breakpoint, but nothing happens.
AndreMiranda
It's probably due to a page error that happened before clicking on the div, and hence it does not run the future javascript. Please check the error console I mentioned above from the tools menu, and click on errors to see what the previous errors are.
Brian R. Bondy
Brina, FF shows no errors, only warnings...
AndreMiranda
+1  A: 

Click on the Firebug icon at the bottom right of your browser window. A window pane should come up at the bottom of the screen with something like this:

Console panel is disabled

Use this page to enable or disable following panels. Enabling these panels will reduce performance and will cause a page reload.
    Console     Support for Console logging.          Disabled Always
    Script      Support for JavaScript debugging.     Disabled Always
    Net         Support for Network monitoring.       Disabled Always

Check all 3 boxes and click "Apply for http://www.example.org"

Check whatever errors come up when you click on the DIV.

Paolo Bergantino
Nothing appears on console... :-(
AndreMiranda
So, uhm, post your code. We're not mind readers you know. :)
Paolo Bergantino
A: 

Assuming your code looks like <div alt="text">. The alt attribute is to be used when something can't be displayed. "For user agents that cannot display images, forms, or applets, this attribute specifies alternate text." W3C HTML 4.01

Use the title attribute to get your desired result on IE/Firefox/Chrome <div title="text">. "Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip"..." WC3 HTML 4.01

For even more info read http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/