JavaScript Coders : IE vs FireFox

Discussion in 'Computer Forum' started by amit82cse, Jun 30, 2006.

  1. amit82cse

    amit82cse Silent observeR

    If you are developing JavaScript code and you want it to work in all browsers e.g. IE, FireFox, pay attention to following details:

    How FireFox differs from IE

    1. no outerHTML in FireFox

    2. width should be "100px" and not "100 px" in FireFox <- notice a space between number and unit

    3. Instead of cursor=hand use cursor=pointer in FireFox

    4. In FireFox style.background returns string literal describing 5 to 6 properties. If you are just interested in color then use backgroundColor property

    5. In FireFox backgroundColor always return rgb(a, b, c) format (note the space after ,) and in IE you can set color using this object but it returns rgb(a,b,c) (note no space after ,)

    6. innerText does not work in FireFox instead use textContent
    alpha1 likes this.
  2. alpha1

    alpha1 I BLUES!

    Good info.
    Though, I dont do JavaScript anymore.

Share This Page