Jump to content

IE Not Respecting My Code


Recommended Posts

Hey everyone,

If you browse over to my site in Firefox, the page will show up just fine, but if you do the same in IE, all you get is a fuschia page with nothing else on it. The source shows, but not the actual content.

Anyone got any idea as to why IE is acting this way?

Thanks.

Link to comment
Share on other sites


I see your problem, Just so you know, IE does not support xhmtl 1.0 strict, i would recommend using XHTML 1.0 Transitional

XHTML

Internet Explorer's support of XHTML (the successor to the standard document markup language HTML) is incomplete, although no claim of any XHTML support was ever made. Rather, XHTML 1.0 was intentionally designed to be usable by HTML 4.0 user agents, like Internet Explorer, if certain document authoring guidelines for backward compatibility were followed. Furthermore, when accessing XHTML documents over a network, such support by non-XHTML-aware browsers is predicated on the documents being served with a MIME type of text/html. To the extent that these requirements are met, IE supports XHTML. XHTML has since matured, and it is now possible to author modular documents that cannot be rendered in a non-XHTML-aware browser like Internet Explorer. Furthermore, the use of the text/html MIME type is now deprecated in XHTML 1.0 Strict and XHTML 1.1, in favor of application/xhtml+xml. Internet Explorer does not recognize this MIME type, so instead of rendering the page, a file download prompt is presented to the user. It is possible to force IE to show application/xhtml+xml pages as either HTML or generic XML, but this workaround involves the manual editing of Windows registry [5]. By forcing XHTML to be interpreted as HTML, it also removes the advantages of using an XML parser, like well-formedness checking. Despite the advent of application/xhtml+xml, many XHTML documents on the web are still served with the text/html type in order to make XHTML documents renderable in Internet Explorer. Some consider this practice harmful as it could result in proliferation of malformatted XHTML documents [6].

Source: http://en.wikipedia.org/wiki/Criticisms_of_Internet_Explorer

Edited by Shindo_Hikaru
Link to comment
Share on other sites

i did forget ot mention, that it could be your codeing, as my site work perfect in xhtml 1.1, feel free to view the source coding.

The following codes i have used in my sites worked in IE 6 and up.

HTML 4.01 (Strict, Transitional, Frameset)

XHTML 1.0 (Strict, Transitional, Frameset)

XHTML 1.1

Edited by Shindo_Hikaru
Link to comment
Share on other sites

The problem is due to you having an unclosed script tag...

<script type="text/javascript" src="content/external.js" />

should be

<script type="text/javascript" src="content/external.js"></script>

You cannot use hard breaking at the end with script tags... need to close it normally.

Because of the hard breaking - IE considered everything after it as part of the script. Normally when an external script is called - everything within (or in your case, after) a script tag is ignored. That is why you got nothing and no script error besides.

Edited by Chozo4
Link to comment
Share on other sites

The problem is due to you having an unclosed script tag...

<script type="text/javascript" src="content/external.js" />

should be

<script type="text/javascript" src="content/external.js"></script>

You cannot use hard breaking at the end with script tags... need to close it normally.

Because of the hard breaking - IE considered everything after it as part of the script. Normally when an external script is called - everything within (or in your case, after) a script tag is ignored. That is why you got nothing and no script error besides.

Stupid IE! :P

Thanks, worked like a charm! :thumbup

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...