windandwaves wrote:
This may help some of you (though probably not the gurus), in changing
images:
http://www.sunnysideup.co.nz/j/imageChange/
Any feedback appreciated.
Works in Firefox 2.0.0.6 and Opera 9.22 on Windows XP, however:
- You are serving XHTML 1.1 as text/html, which is recommended
against per W3C Note "XHTML Media Types".
- You are serving XHTML that is not HTML-compatible as per XHTML 1.0,
Section C, as text/html. (We are gracefully ignoring that there is
no such allowance of HTML compatibility for XHTML 1.1 anyway.)
- You are serving XHTML where HTML 4.01 would have sufficed.
- You are declaring UTF-8 in a meta element that is ignored by an XML
parser; the corresponding XML declaration, which would not be required
if the Content-Type header was set appropriately, is missing.
- You are using the proprietary "author" value instead of the
"DC.Creator " or "DCTERMS.creato r" from the Dublin Core Metadata
standard (ISO 15836-2003).
- By serving as text/html (see above) this is parsed by an
SGML-based parser. However, ETAGOs in the `script' element have not
been escaped.
- Does not work in NN4 because of "className" switching, although NN4
is capable of both hiding and switching the image and its description.
- The feature test for all W3C DOM methods called is missing.
- You are mixing W3C DOM Level 2 HTML with the proprietary innerHTML
property without testing for the latter.
- W3C DOM Level 2 and innerHTML are used without being required,
and no alternative is provided.
- Vertical offset of the image is too great (wrong) in IE 7.
- Hard to maintain because images are identified by number instead
of by name.
And probably I have forgotten something else.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not the
best source of advice on designing systems that use javascript.
-- Richard Cornford, <f8************ *******@news.de mon.co.uk>