Re: associative array in JS
If you were to put quotes around the keys, it would become valid JSON, and then you could use JSON.parse to evaluate the string.
Otherwise, you're limited to eval, which is not the best option because it parses and executes more than just data structures.
Re: associative array in JS
Thanks, eval() worked for me.. any ideas how to display data based on mouse position over the canvas
here is an example: http://www.koolchart.com/demo/
check out Barchart
Re: associative array in JS
In JS objects are also associative arrays or hashes.
theStatus.Home
can also be read.
theStatus['Home']
You can access a form by performing these DOM calls:
document.forms['theForm']
document.forms.theForm