In java script I am including a source file like usual
<script src="http://source.com?file=1" type="text/javascript"></script>
The problem is that sometimes the file is not accessible and it throws an exception. Is there any way to include a file like this but if its not available catch the exception and navigate to a new page? I don't want all exceptions to navigate to a new page, just this one instance.