Jump to content

Form With Js In For Loop


Muiter
 Share

Recommended Posts

The script below is working fin but I want to use the form in an for loop, how to change te form and JS te keep it working?<script> function bewerking_uren(form) { form.bewerking_tarief.value = form.bewerking.options[form.bewerking.selectedIndex].value } </script> <td><select name="bewerking" onChange="bewerking_uren(this.form)"> <option></option> <?php $sql_bewerking = "SELECT omschrijving, tarief from sp_calc_werkzaamheden ORDER BY omschrijving ASC"; $res_bewerking = mysql_query($sql_bewerking,$con); while ($row_bewerking = mysql_fetch_assoc($res_bewerking)){ ?> <option value=<?php echo $row_bewerking["tarief"] ?>><?php echo $row_bewerking["omschrijving"] ?></option> <?php } ?></select> </td> <td><input type="text" name="bewerking_tarief" size="5" value=" /></td>The original script can be found at http://mld.ursinus.edu/~jarana/Colby/template1.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...