You’ve probably never heard of Eric Vasilik but his work affects millions on a daily basis.  He is a programmer and also the creator of the innerHTML element property.

The innerHTML element property is commonly used in Javascript (and therefore Ajax) scripts that so many sites use these days.  Basically anything on the web that is dynamicly updated without a page reload is probably using the innerHTML property to change content.

Web developers may know that using innerHTML on <table> elements does not work in Internet Explorer.  And the reason for this? Eric Vasilik didn’t implement it properly way back in IE3 when he was writing the parser for the DOM almost 12 years ago!

Yes he is the inventor of innerHTML but he is also the cause of a lot of modern headaches!  The funny thing is, his misimplementation came back to bite him in the butt 10 years later.

Luckily, the workaround for this problem is pretty simple but the morale of the story is: poor coding not only affects everyone, even you!

Popularity: 6% [?]

29 Responses to “Can’t use innerHTML on Tables in IE? Here’s why”
  1. Acai Juice says:

    Pretty ironic how something like that can come back to bite you ten years down the line. I have to imagine it’s due in part to his work helping spawn a whole industry, funny that the original code is still being used, though.

    -Jeff

  2. Heheheheheheh – Ten years is a looooooong time in the world of the internet, and Eric must be quite peeved that a mistake made in his “youth” has come back to haunt him like this! Very funny, but a sterling example of what poor coding can lead to many years down the line….ummm, just one question….Who uses IE anyway???

  3. How exactly did he get bitten in his butt? Your post is like a trailer for a film!

  4. Natron says:

    I wonder if innerHTML on server based tables will work with AJAX.net ? hmmm…

  5. THis is the reason for that IE issue for my site. I am so tired of it. Anyway thanks for the explanation

  6. freelife says:

    I didn’t really knew that Eric Vasilik is the creator of the innerHTML element property.

  7. Marblehost says:

    Ajax is a reasonably good programming language but it lacks the easy extensibility of other languages. PHP is adapted everyday. Mainly because of the number of programmers using the language.

  8. Yes, I have never heard of this guy but it sounds like he is a very important guy in the internet world. You said there was a simply solution what is it that you were talking about.

  9. web development forum says:

    poor coding will always come back to haunt you. That was a good post even though I have never heard of the man.

  10. I have not come across the term inner html before but it seems same as ajax. In either case ajax is still evolving as a field even though it has become a common standard in web design and development. In addition to browser incompatibilities such as the one discussed here, there are other issues which still need to be resolved in due course. Search engine indexing is another such issue where ajax is lacking.

  11. Setai says:

    Yeah that’s what happens when you do something just to get it over with and get some money and the it turns out that it wasn’t such a small project after all and the shortcuts you took along the way affect you personaly.

  12. Google Money says:

    I’d highly recommend a JS framework to cut this sort of issue out entirely. jQuery is the number one choide IMO.

  13. Yeah, this is the reason my code doesn’t work properly in IE as well

    no really……..it is! ;-)

  14. Thanks for sharing the knowledge!

  15. I heard they are giving up on IE entirely though. Guess things work out someway or another. But it might be he’s the reason why IE is going to die out.

  16. Wow! Talk about the past coming back to haunt you! Hopefully this will aid in the demise of IE, and get people to convert to FireFox.

  17. Is there any sign of a fix coming for this in the nearish future? Not that it makes much difference to me since I mostly use scriptaulous these days anyway.

  18. I find it really funny that something that was coded 10 years ago has caused so much problems now. It just shows that you have to double-check your code to make sure these problems don’t happen.

  19. chris says:

    Ajax isnt a programming language. its a method of using Javascript (client side) with server side scripts (like ones written with PHP)

  20. Simon says:

    I doubt we will ever see a fix. Its internet explorer, as it advances it becomes less compatible with everything else despite what microsoft say!

  21. Just like too complicated code. If you avoid comments and nice formatting you’ll not be able to read the code a week later.

  22. Asthma says:

    I’ve created a simple form in Javascript. There are text fields, a password field, and radio buttons. However, I am totally lost on how to validate them using innerHTML. Anyone have any suggestions, hints, or starter code to help me out?

  23. Asthma says:

    I have dynamically created a table and I have assigned a unique key to each cell in the table. For the loops I have used PHP and for writing the data into the table I have used the document.innerHTML property
    Now I need to retrieve the value in a cell using it;’s id . how can I do the same ?
    Plzz suggest suitable links (if any) dealing with this concept. ??

  24. I am trying to find the code where you can make a scroll box but inside of it you can put a code inside and it shows up.
    Any suggestion….

  25. Glucosamine says:

    I prefer to use CSS to override the limitations of IE and code separately for the different browsers.

  26. Photocopiers says:

    Problem with that is, is that your CSS wont valid properly, i saw a hack somewhere though that allowed you to use hacks and still get it past validation.

  27. Adwido says:

    Yes, it affects everyone, but we have to give the guy a break. He invented something that probably saved us from more headaches than it has caused.

  28. Lapis Lazuli says:

    IE doesn’t bother to implement CSS standards

  29. Spyros says:

    I’ve had several innerHTML issues in the past with javascript. I really start to hate the DOM model :/

  30.  
Leave a Reply