javascript associative array initialization error?
javascript
Solution
First you should fix your `<script>` tag to
<script type="text/javascript">
Next, if you want to use numeric indexes, try to declare them as a string:
var tids = {
'308': 1,
'312': 1,
'313': 1,
'314': 1
};
Please note, however, that you will not be able to reference them in object notation (i.e. `tids.308`). You could simply use arrays instead of objects:
Problem
``` <script> var tids = { 308: 1, 312: 1, 313: 1, 314: 1 }; </script> ``` results in "missing } in XML expression with an arrow pointing to the first colon in the JS error console. Isn't this a valid declaration?