A small version of my script would be this:
var x = null;
for(var i=0; i<x.length; i++)
{
//do stuff
}
I noticed (by doing some ‘alert’ debugs) that my script halts when evaluating x.length. Even when i try to print it in an alert, the script stops.
The idea is that somethimes my x variable is an array, sometimes is null.
Of course, I am a beginner, so probably i’ve done something stupid. No errors appear in my Firefox 6 error console.
Thanks a lot for any ideas!
try
This will first check whether
xis notnull. Ifxisnull,forwill not run. If it is notnull,forwill run as usual.