Hi all, i'm working on a php script and i got a little javascript. i'm trying to get information from some hidden fields but i keep getting an error, udefined. here are the codes:
var counter = 5;
var avail = document.getElementById['available_array[counter][0]'].value;
here is the original
tmp=document.order.elements['available_array[counter][\"+document.order.elements['BRANCHC[ ]'].selectedIndex+\"]'].value;
here is the select
<SELECT NAME="BRANCHC[ ]" SIZE=1 ID = "BRANCH_LIST>
and here is the hidden tag:
<input type="hidden" id="available_array[<?=intval($temp)?>][<?=$j?>]" name="available_array[<?=intval($temp)?>][<?=$j?>]" value="<?=$available_array[$i][$j]?>">
please tell me what im doing wrong