I am trying to create a dialog box that will appear only if the browser selected is IE (any version) however I get this error:
Message: HTML Parsing E
You're modifying document while it's being loaded (when browser hasn't "seen" closing tag for this element) . This causes very tricky situation in the parser and in IE it's not allowed.
IE blog has explanation of this.
The solution is to modify another element that's earlier in the document and has been loaded completely (where browser already saw closing tag for it).
BTW: The string is not allowed in element. Use <\/ which is a safe equivalent in JS strings.