| Programming C# C++ (7) Delphi (617) Java (8) JavaScript (31) Document (8) Events (8) ExtJS (9) Strings (3) perl (9) php (4) VBScript (1) Visual Basic (1) New related comments Number of comments in the last 48 hours How to prompt the user with an inputbox in Javascript |
HTML Content invisible in IE, but properly shown in Firefox
Recently I added some javascript to this web site and tested it in FireFox. Everything worked fine. Then I got emails that the comments were no longer visible. I tested, and could not confirm the problem. Today at a friend's house, I encountered the same problem. Comments were invisible on all pages if you used Internet Explorer. They would show fine in Firefox! Here are some thoughts I had:
Eventually I found the reason for the problem.
The W3 HTML validator would not catch this as a bug! Look at the bolded section - you can see that I forgot the matching closing part. FireFox would ignore this problem and recognize the end of the javascript by the /script tag. IE would ignore everything up to the //--> tag.
Comments:
| ||||||||||||||||||