Based on the most common, and most infuriating, similar problems I've had with JS, I'd recommend you check the following:
the 's' at the end of 'permissions' is actually there.
the 'A' in 'Array' is capitalized
The part of the function where you're declaring permissionsArray is actually being called (if in a conditional block)
You're not testing permissionsArray anywhere with a single '=' instead of a double '==' anywhere.
You're actually calling the function (and it has completed) before trying to access permissionsArray - I've had timing problems like this a lot using setTimeout, setInterval and various Ajax-related scripts
also, if you use var statement inside a function's body, the created variable become local to that function. in the snippet code isn't present, but in any case. so that if you do:
Code:
var permissionsArray;
function nonMSPopulatePP() {
. . .
var permissionsArray = new Array("A", "B", "C");
alert(permissionsArray); //displays "A,B,C"
}
permissionsArray set on the global environment still undefined.
Last edited by ZeroKilled; 11-17-2008 at 10:25 AM.
my mom is javascript, dad is javascripter, granpa is javascriptor, and my little sister is javasRidiculous. my nature language is javascript, then come spanish and english -- me
Bookmarks