Take the 2-minute tour ×  I have 8 javascript file in html,how
can i check if js file is loaded or not and also handle error if
any one of the file is not loaded in cross browser  Thanks in
advance!  share|improve this question You can also use firebug
to analyse which files gets loaded and which doesn't and the
reasons for the files as to why aren't they getting loaded... – 
Mahendra Apr 19 '11 at 6:54 i must check whether the js is
loading in all broswer also.so i need to display success
msg,once the js is loaded –  Tarun Apr 19 '11 at 7:08  5 Answers
5  You could use "try catch" to avoid the errors when accessing
non-existing function or data, and react as you want
share|improve this answer  You can try using the "try-catch"
block in javascript.  To use it you can call any one function /
refer a variable of the file you want to check inside the try
block. If it does not enter the 'catch' block then it means that
the file is loaded.  You can also use Firebug to check which
files gets loaded and which aren'