Dynamic List Box selection controls text box in form
I am having trouble linking one dynamic list box to a text field.
What I want to do is:
Use one recordset
When the value in one dynamic list box changes, update the value in another text box.
For example:
One dynamic list box will contain a list of dates in “August 4, 1999” format. Within the same record is another field with the date in another format “mm/dd/yyyy.” When the text format is selected in the list box, I would like the other text box to be updated with the corresponding “mm/dd/yyyy” format.
If there is another way of doing this, I am all ears.
Comments
Me too!!!!
I am currently trying to do this aswell - please let me know if you manage to do it.....
Thanks,
Mark
Here is how I found to do it.
<form name="theform">
<select name="from" onChange="passvalue()">
<option value="05/05/05">05/05/05
<option value="06/06/06">06/06/06
<option value="07/07/07">07/07/07
</select>
<P><input type="text" name="to">
</form>
<script language="javascript">
function passvalue(){
document.theform.to.value=document.theform.from[document.theform.from.selectedIndex].value;
}
</script>
You must me logged in to write a comment.