On Jan 27, 10:27 pm, "-Lost" <spam_ninjaREMOV...@REMOVEMEcomcast.net>
wrote:
Quote:
Is it possible to check if a file was not included properly?
appendChild doesn't include any files - it simply adds new element to
the document DOM Tree. At the moment of adding new <linkor <script>
element it doesn't know neither it cares if src string attribute value
points to some existing document. It even doesn't care if src
attribute is a valid URL. It just an opaque string for it to use as
attribute value. So no, this kind of check is not possible.
On IE <linkelement has onerror handler you could use but this
handler is not supported by others. The only cross-browser option is
to choose some "key rule" in the stylesheet and periodically check if
it is set during some period of time. jsNet is based on this technique
<http://jsnet.sourceforge.net/>
Quote:
if (appendChild('css_doc.css'))
This obviously would lead to run-time error. I presume you meant to
say appendChild(linkObject)