i've got an array created in php that I want to send over to a javascript function.
onclick = "return sjekk(<?echo $names; ?> )"
in my "sjekk" function, when I try to print an alert :
function sjekk(navn)
{
alert(navn); // or alert(navn[0])
return(false);
}
I get "function Array { [native code]}"
How do I print out the names I want?
onclick = "return sjekk(<?echo $names; ?> )"
in my "sjekk" function, when I try to print an alert :
function sjekk(navn)
{
alert(navn); // or alert(navn[0])
return(false);
}
I get "function Array { [native code]}"
How do I print out the names I want?
Comment