Error with IE javascript code ex...

User 455853 Photo


Registered User
5 posts

Hi.
I have plugged the IE code suggested in the handbook into my web page.
<!--[if IE]>
<script src=”http://html5shim.googlecode.com/svn/trunk/html5.js”></script>
<![endif]-->
W3C's validator does not like it as it cannot interpret it as "Sorry, I am unable to validate this document because on line 14 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

I have tried removing the <!-- and --> so the code was active. I have also tried including a closing statement at the end</[endif]> and expanded the script to script type; so it now reads
<if IE>
<script type="text/javascript" src=”http://html5shim.googlecode.com/svn/trunk/html5.js”></script>
</endif>
but the W3C validator still baulks at it.
Any clues? Until it is valid code I will leave it out off my web pages.
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Peter,

A link goes a very long way in getting assistance here as we are more able to see exactly what the problem can possibly be that way. Even if you don't upload it to your main site, uploading it to a subdirectory just so we can view it would be helpful.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.