View Full Version : Detecting Valid .js/script files

09-13-2003, 01:11 AM

Im loading files as so...

<script src="script1.asp"></script>
<script src="script2.asp"></script>
<script src="script3.asp"></script>
<script src="script4.asp"></script>


The scripts are dynamically generated on the server and sometimes return bad script or http errors - this cannot be changed as some of the scripts are out of my control.

The browser reports the script errors as expected(this is not a problem),

What I need to do is loop over all the scripts in the page and decide which ones did not load or produced errors. ..

The simple solution would be to put a know variable in the scripts and check for it - But I don't have access to all the scripts so I can't do this.

I've tried attaching onload events also, but this fires if its valid or not so cant do this.

Any Ideas?