I have a asp.net form, which is using two Person usercontrols, one named 'BillingInfo' and one named 'ShippingInfo'. The person usercontrol has a "Address" input field that has the class set to "address1". On my order page, how can I assign the value of one Address field into the other using javascript? The dynamic IDs are throwing me off. Each control is inside of a div, titled "ShippingContactInfo" and "BillingContactInfo" respectively. The function is firing, and when executing, the objects are being populated, but for some reason the value assignment is not doing anything on the page.
I have tried:
function copyBillingAddress(f) {
if (copyBillingCheckBox.checked == true) {
var addrCopyFromVal = $('#ShippingContactInfo .address1').value;
var addrCopyTo = $('#BillingContactInfo .address1');
addrCopyTo.val(addrCopyFromVal.val());
}
}