Re: document.write

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Note for duplicate mail:
http://www.heise.de/newsticker/data/uma-01.04.03-000
Zahlreiche Mails müssen nun ein zweites Mal gesendet werden. Sorry für 
Duplikate.
Many mails must be sent a second time. Sorry for duplicates.]


Hello Matt, dear list members,


Am Freitag, 28. März 2003 12:05 schrieb Matt Fletcher:
> The XHTML 2 spec says that you can't use
> document.write() to create content for a page,
> and mentions the node tree (or something like
> that). How exactly does that work? Is it
> currently implemented? Or is it coding using the
> InnerText properties? Please enlighten me!

Take a look at http://www.w3.org/TR/DOM-Level-2-Core/ that's about the DOM
node tree and ways for its manipulation.

document.write() should not work for any XHTML at all, as long as the user
agent recognizes that the document is XHTML and not HTML. So the only
exception is XHTML 1.0 served as text/html.

innerText / innerHTML is very bad design, I recommend not to use it.

If you want to experiment with XHTML, try Mozilla, Konqueror (from KDE 3.1 or
newer) or Opera (6 or 7) and be sure to let your documents end on .xhtml
(when working locally) resp. send them as application/xhtml+xml (when working
remotely through HTTP).

I have attached an example using XHTML, ECMAScript and DOM to automatically
generate a table of contents including anchors, hyperreferences and links.
It also contains some dynamic parts.

The document is known to work in Mozilla 1.3. I know it doesn't work with
Konqueror 3.1 because Konqueror 3.1 doesn't handle the onload-attribtue of
the body element. Only the dynamic rect part works in konqueror.


Bye
- --
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+i0LKzu6h7O/MKZkRAu9qAKC7RCCzfwvKV/6PupQaGtEeyfZmtQCcDbrn
Hn3vuS9n1cJjGXUK2ADdaIw=
=47bW
-----END PGP SIGNATURE-----

Received on Wednesday, 2 April 2003 15:07:57 UTC