Posted on 2007-07-30
The way I am importing them is something like this:
script.src = 'configuration/wordlist-' + number + '.js';
script.defer = true;
var head = document.getElementsByTagName('head').item(0);
with number been a variable that I have set before this script runs.
I want to be able to check if that file exists before I import it, or, if it can't import (/doesn't exists), runs a function of my choice. Either way would work.
If this is possible a solution would be greatly appreciated.