Ok folks....I searched the forums, my head is pounding from reading so many posts with similiar problems! Basically what Im trying to do, is load a php array which I did using the following code(pretty simple) and using <body onload="buildJsArray();">
, to load up a Javascript array which gives me an 'object expected error' on the line with the <body> tag. Im doing this because when the user hits a submit button, I want to loop thru the js array and validate a code that was entered in an input text box. I have searched big time, believe me! Thanks a lot!
..........
while($loc_row=mysql_fetch_array($loc_result))
{
$loc_array_local[]=$loc_row[local];
}
And the javascript function being called from the <body> tag is........
function buildArray()
{ alert('IN HERE');
<?
for($x=0;$x<count($loc_array_local);$x++)
{
?> var jsLocal[<?=$x;?>] = '<?=$loc_array_local;?>';
alert(jsLocal);
<?
}
?>
}