Populate Text Box from Select (but with text and selects as arrays)

I am lookin gto populate a text box with the results of the choice made in a select box.
However I have multiple of these on the page as they are generated from a query.

The way I would do it for one box doesn’t work for this set up.

Any ideas really appreciated.

This is my javascript

[php]

[/php]

and these are my select and text boxes.

[php]

   <select style="width:100%" name="errormsg_id[]"  id="errormsg_id[]">
   
  <?php do { ?> 
  					   
 	     <option value="<?php echo  $row_rserrormsg['errormsg_id']?>"
		 <?php if ($row_rsdates['errormsg_id'] == $row_rserrormsg['errormsg_id']) { echo("selected='selected'"); } ; ?> >
		 <?php echo $row_rserrormsg['error_message']?></option>
  
         <?php } while ($row_rserrormsg = mysql_fetch_assoc($rserrormsg)); ?>
         
	<?php  mysql_data_seek($rserrormsg, 0);
	$row_rserrormsg = mysql_fetch_assoc($rserrormsg);?>
	</select>
   </td>  
[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service