Closed
Bug 197586
Opened 22 years ago
Closed 20 years ago
doesn't load external javascript when using xhtml
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: Eric.Kelm, Assigned: jst)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.1) Gecko/20020826
Mozilla seems to not execute external javascripts in xhtml files when they are
saved on hard disk. It works when being online.
My own pages also don't work.
Reproducible: Always
Steps to Reproduce:
1. Just download these three files and put them into the same folder. The first
is HTML 4.0 and the second XHTML 1.0.
http://selfhtml.teamone.de/html/xhtml/anzeige/beispiel.htm
http://selfhtml.teamone.de/html/xhtml/anzeige/beispiel.xhtml
http://selfhtml.teamone.de/html/xhtml/anzeige/zeitstempel.js
2.Check the files when being online.
3.
Actual Results:
The HTML 4.0 page shows a time stamp at the bottom of the page. The XHTML 1.0
page does not.
Expected Results:
It should have executed the script.
Comment 1•22 years ago
|
||
I think this is a dupe of bug 111514. Let me explain what's going on though:
-When you load the pages over HTTP (the 'when online' part) things works because
you are _not_ using XHTML. The .xhtml file is returned with a text/html MIME
type by the server, so it is processed as HTML.
-When you load the pages from disk, the .xhtml file is processed as XHTML.
-The JavaScript file is loaded, it just has an execution error. The Tools, Web
Development, JavaScript Console shows:
Error: document.write is not a function
Source File: file:///C:/blah/zeitstempel.js
Line: 1
As for why document.write doesn't work, see bug 111514.
Assignee: asa → jst
Component: Browser-General → DOM HTML
QA Contact: asa → desale
Comment 2•22 years ago
|
||
document.write does not and never will work in XML. INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
![]() |
||
Comment 3•21 years ago
|
||
*** Bug 243475 has been marked as a duplicate of this bug. ***
![]() |
||
Updated•20 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
![]() |
||
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 68193 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•