2

I have included a couple of external JavaScript files in a webpage. These JavaScript works well on all browsers, except IE. On IE, these two files are not included in the webpage. Even on the "Network" section of F12 Developer Tools, it does now display requests to the two external javascript files. Also, I have included two external CSS file on the page. These CSS files also does not get any request too.

What could be the problem?

The page: http://shapco.plus.printsites.com/templates-download.html The external JavaScript files:

<script type="text/javascript" src="http://templates.kliqprint.us/js/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="http://templates.kliqprint.us/js/templates.js"></script>

The external CSS files:

<link href="http://templates.kliqprint.us/css/colorbox.css" rel="stylesheet" />
<link href="http://templates.kliqprint.us/css/style.css" rel="stylesheet" />
2
  • The link to the page isn't working. Could you get that back up and/or post the entirety of the html(or at least the markup surrounding those tags) Commented Oct 23, 2012 at 16:04
  • Here is the full HTML code: jsfiddle.net/Debiprasad/uAytQ Commented Oct 23, 2012 at 16:08

5 Answers 5

3

Your doctype is xhtml strict , which does not allow css declaration outside head tag.

Maybe you should first work on making your document xhtml-strict valid

    Result: 18 erreurs / 0 avertissements

    line 73 column 79 - Erreur: there is no attribute "onKeyPress"
    line 79 column 29 - Erreur: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified
    line 80 column 7 - Erreur: document type does not allow element "tr" here
    line 81 column 20 - Erreur: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified
    line 83 column 7 - Erreur: end tag for "tr" omitted, but OMITTAG NO was specified
    line 78 column 4 - Info: start tag was here
    line 111 column 216 - Erreur: required attribute "alt" not specified
    line 113 column 9 - Erreur: ID "_mcePaste" already defined
    line 112 column 9 - Info: ID "_mcePaste" first defined here
    line 114 column 9 - Erreur: ID "_mcePaste" already defined
    line 112 column 9 - Info: ID "_mcePaste" first defined here
    line 115 column 9 - Erreur: ID "_mcePaste" already defined
    line 112 column 9 - Info: ID "_mcePaste" first defined here
    line 116 column 9 - Erreur: ID "_mcePaste" already defined
    line 112 column 9 - Info: ID "_mcePaste" first defined here
    line 450 column 17 - Erreur: end tag for "br" omitted, but OMITTAG NO was specified
    line 450 column 8 - Info: start tag was here
    line 453 column 78 - Erreur: document type does not allow element "link" here
    line 454 column 75 - Erreur: document type does not allow element "link" here
    line 458 column 61 - Erreur: document type does not allow element "hr" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    line 464 column 42 - Erreur: end tag for "select" which is not finished
    line 473 column 15 - Erreur: end tag for "br" omitted, but OMITTAG NO was specified
    line 473 column 6 - Info: start tag was here
    line 485 column 9 - Erreur: end tag for "br" omitted, but OMITTAG NO was specified
    line 485 - Info: start tag was here
    line 491 column 15 - Erreur: end tag for "div" omitted, but OMITTAG NO was specified
    line 40 - Info: start tag was here
Sign up to request clarification or add additional context in comments.

Comments

2

If it's not a typo, your second <script> element is one closing tag short. That will most definitely not work.

It's also likely that because of this, the following <link> elements are not getting loaded properly.

If that doesn't help, <link> elements do not require a closing tag. Just skip the / for those.

4 Comments

There is a very good chance this is it. IE is far stricter on the errors it will allow than the other major browsers are.
I have that in my code. Just forgot to add it here in the question. Thank you for noticing.
@Debiprasad: ok, then for your script elements everything is technically fine. Check the error console if the resources just can't get located. For the <link> elements, try to remove the trailing slashes.
The HTML Editor of the CMS of the webpage adds those trailing slashes automatically to the <link> elements. I don't have anyway to remove those. No error in the console.
0

The only thing I could debug was the

<script type="text/javascript" src="http://templates.kliqprint.us/js/jquery.colorbox-min.js"></script> <script type="text/javascript" src="http://templates.kliqprint.us/js/templates.js"></script><script type="text/javascript"> //Google Analytics </script>

is in the Body section

enter image description here

Can u trim it up and bring it to header. When I took the Raw HTML and copy pasted here is the screen that I get.

enter image description here

Comments

0
  • your doctype is wrong, use <!doctype html>
  • you are missing a closing </div>.
    Insert one before </body> and that should make your page work, although I didn't check where it's meant to be closed

I am fairly sure that the second issue is the one that is breaking IE tho, the first can be probably avoided.

1 Comment

Thank you for your reply. Now all the divs are closed. Still, IE is unable to request those 2 external CSS files and 2 external JavaScript files from a different domain.
0

The page has some XML code, which creates the problem on IE. After removing those XML code, it worked great.

1 Comment

That's because you wrote it in MS Word (note the Office XML markup). If you're not using an IDE like Visual Studio I'd suggest Notepad over MS Word.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.