hello
how do i populate or change the values in multiple textfields using javascript? the textfields has the same ID because it is in a repeat region. i manage to change just the top most textfield using javascript. so how to populate the rest?
<script type="text/javascript">
function chalb()
{
document.getElementById('albid').value = document.getElementById('alb').value;
}
</script>
.
.
.
<input name"albid" id="albid" type="text" value="<?php echo $row_rspri_schimages['alb_id']); ?>">
'albid' refers to the textfield ID i want to change and 'alb' is the ID of a select menu.
lets say there are 10 repeated textfields, a user selects a value from the select menu 'alb' and a button when click will execute the "chalb()" function. the function suppose to change all the textfields values to the new selected value but it only changes the top textfield.
help? is it an array that i'm missing?