On 24/04/2006 13:20, (e-mail address removed) wrote:
[snip]
http://sandbox.lesshype.com/home.php
[snip]
The javascript one will not trigger in IE under and circumstances. Any
thoughts?
If you had looked through the archives of this group, you would have
understood why.
Do not use the setAttribute method to add event listeners. Use the
intrinsic event properties, instead. In fact, avoiding the setAttribute
method is a good idea, in general, as IE doesn't implement it well.
Notes about that document:
- Serving XHTML as HTML is pointless at best. Serving XHTML
Transitional really /is/ a waste of time; not even new HTML
should be written to the Transitional DTD. If you must (which
is unlikely to be the case), don't include the XML prolog as
it will throw IE into Quirks mode.
- The Content-Type meta element is redundant. Your server is
sending a Content-Type header, and that will take precedence.
- Comment declarations in script and style element content has
been unnecessary in HTML for years. It is catastrophic in
XHTML: the comment will be taken literally and the content
will be ignored.
- If I read your intentions right, you want to use the
XMLHttpRequest object to load both content and navigation. If
this is for the Web, that is a /terrible/ idea.
If you want to load content dynamically, use a server-side
language. You have PHP, so put it to use. Relying on scripting
to provide content is bad enough, but a feature like the
XMLHttpRequest object is so much worse.
Mike