Im trying to figure out how to use a hidden variable as an array, modifiable from the client side via javascript calls. What I would like to do is something similar to this this...
<input type="hidden" name="test[]" value="None">
<script type="text/javascript">
document.getElementById('test[0]').value="data0";
document.getElementById('test[1]').value="data1";
alert(document.getElementById('test[0]').value);
</script>
but it doesn't seem to like it. Any suggestions would be appriciated
<input type="hidden" name="test[]" value="None">
<script type="text/javascript">
document.getElementById('test[0]').value="data0";
document.getElementById('test[1]').value="data1";
alert(document.getElementById('test[0]').value);
</script>
but it doesn't seem to like it. Any suggestions would be appriciated