Copy Drowndop to text field
I am using the Dynamic Dropdown extension to populate a menu list, which is all working fine. I created a second one populates to another drop down list which is also working. I now what to copy the value of the second to a text field when a checkbox is selected. Using the following code:
<script>
function copyTextValue() {
var text1 = document.getElementById("LastBillDate").value;
document.getElementById("S_date").value = text1;
}
</script>
<input type="checkbox" name="check1" onclick="copyTextValue();"/>
The problem is it copying the values that are used to value that is being use to match the the dynamic dropdown list from. Does that make any sense? Look at the following page:
times_Search_temp.php
If you select the Client Company, it populates the list under it, Client Name. It also populates the Last Bill Date. However when I click the Copy To Start Date check box it copies the value that is used to match Client Company & Last Bill Date and not the actual value listed there.
Any ideas?