javacript array question

Merrill Oveson moveson at
Tue Aug 16 14:32:15 MDT 2011


This works:

   print "<body onload=\"start( new Array(32.182208,32.2),new
Array(-97.421321,-96.8), new Array('3446','10'), new
Array('Bob','Merrill'), new Array('Exempt','Non-Exempt') )\">";

this doesn't:

   print "<body onload=\"start( new Array(31.5), new Array(-97.8), new
Array('10'), new Array('Merrill'), new Array('Non-Exempt') )\">";

ok, ok, I know the rule, so this should work but it doesn't:

print "<body onload=\"start( Array[31.5], Array[-97.8], Array['10'],
Array['Merrill'], Array['Non-Exempt' )\">";

So what's the proper syntax?  Here's my goal:

print "<body onload=\"start( new Array($lat), new Array($long), new
Array($reg), new Array($owner), new Array($exemption) )\">";

where $lat, $long, $reg, $owner, $exemption can be arrays of only one element.



More information about the PLUG mailing list