Web Analytics Made Easy -
StatCounter coding problem with IE and Firefox - CodingForum

Announcement

Collapse
No announcement yet.

coding problem with IE and Firefox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • coding problem with IE and Firefox

    I wrote a page a code that works perfectly in IE but doesn't work at all in Firefox. So, I tested a simple code below to compare between IE and FF. Why it works on IE but not FF. Thanks =)

    <html>
    <head>
    <script type="text/javascript">
    function b()
    {
    document.getElementById("pp").innerText="sdfsdfsdfS";
    }
    </script>
    </head>
    <body>
    <img border="0" src="images/h.gif" onmouseover="b();">
    <p id="pp">
    </body>

    </html>

  • #2
    use .innerHTML. Works on both, I'm using it all the time.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

    Comment


    • #3
      You will find that innerText is IE only so as BubikolRamios says use innerHTML
      The silent one.

      The most dangerous thing in the world is an idea.
      The most dangerous person in the world is the one with an idea.

      Comment


      • #4
        Thanks for you replies.
        Is there any website that i can get some reference about what works on FF and what not? Thanks.

        Comment


        • #5
          Take a look here this will help

          http://www.w3schools.com
          The silent one.

          The most dangerous thing in the world is an idea.
          The most dangerous person in the world is the one with an idea.

          Comment

          Working...
          X