doesn't load external javascript when using xhtml

RESOLVED DUPLICATE of bug 68193

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 68193
15 years ago
10 years ago

People

(Reporter: Eric Kelm, Assigned: jst)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
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

15 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
document.write does not and never will work in XML. INVALID.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
*** Bug 243475 has been marked as a duplicate of this bug. ***
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 68193 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago14 years ago
Resolution: --- → DUPLICATE

Updated

10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: desale → general
You need to log in before you can comment on or make changes to this bug.