Have you ever wondered why they have not supplied javascript with the same functionality as a print_r in php. Well you can however see what's going on by doing a foreach loop in the script on the variable.
var UnknownVar = ["123","676","1121"];
for ( var i in UnknownVar ){ alert( UnknownVar ); }
Above is one way the alternative is to just use firebug which has a very nifty tool which can show you all the variables in the current javascript environment. I recommend using the following as it is much more informative.
console.log(UknownVar);
This will give you a full output of the variable.
By PHPin24 @ 2010-01-07 11:45:55
|