Reinhold Schrecker wrote:
I am using the JavaScript prototype library
(http://prototype.conio.net/)
My sincere condolences.
and want to check if the library is running properly, because javascript
prototype is not supported by IE versions older than IE 6 (see
http://wiki.osafoundation.org/bin/vi...AjaxLibraries).
That is an understatement. Prototype.js is much more restricted to certain
browsers than you think. Which is one of its many flaws.
It is possible to rewrite that code so that it runs with a wider spectrum
of HTML user agents, following design guidelines laid out in numerous
discussions in this newsgroup, and programming along the version
information known for each language feature[1]. However, I'd rather
rewrite it from scratch than to attempt to correct this junk.
What is the best way to check, if prototype is running correctly?
Always test the return values.[2] (With a `typeof' test you can only test
that a certain variable does not have the `undefined' value; it does not
test that the code invoked by calling that variable as a method will run
correctly. Incidentally, you should not trust anything VK is proposing.)
PointedEars
___________
[1] <URL:http://pointedears.de/es-matrix/>
[2] <URL:http://pointedears.de/scripts/test/whatami#inference>
--
There are two possibilities: Either we are alone in the
universe or we are not. Both are equally terrifying.
-- Arthur C. Clarke