I want to be able to copy the personal address controls values over to the shipping address controls when a user clicks a link button. I have the following javascript
function NewUserCopyPrsnlToShip()
{
text = $find("<%= txtPersonalAddress.ClientID %>").get_textBoxValue();
$find("<%= txtShippingAddress.ClientID %>").set_value(text);
text = $find("<%= txtPersonalAddress2.ClientID %>").get_textBoxValue();
$find("<%= txtShippingAddress2.ClientID %>").set_value(text);
text = $find("<%= txtPersonalCity.ClientID %>").get_textBoxValue();
$find("<%= txtShippingCity.ClientID %>").set_value(text);
document.getElementById("<%=rcbShippingState.ClientID%>").selectedIndex = document.getElementById("<%=rcbPersonalState.ClientID%>").selectedIndex;
text = $find("<%= txtPersonalZip.ClientID %>").get_textBoxValue();
$find("<%= txtShippingZip.ClientID %>").set_value(text);
}
It all works except the combobox copy part. Both comboboxes are bound to the exact same collections. How do I make this work?
function NewUserCopyPrsnlToShip()
{
text = $find("<%= txtPersonalAddress.ClientID %>").get_textBoxValue();
$find("<%= txtShippingAddress.ClientID %>").set_value(text);
text = $find("<%= txtPersonalAddress2.ClientID %>").get_textBoxValue();
$find("<%= txtShippingAddress2.ClientID %>").set_value(text);
text = $find("<%= txtPersonalCity.ClientID %>").get_textBoxValue();
$find("<%= txtShippingCity.ClientID %>").set_value(text);
document.getElementById("<%=rcbShippingState.ClientID%>").selectedIndex = document.getElementById("<%=rcbPersonalState.ClientID%>").selectedIndex;
text = $find("<%= txtPersonalZip.ClientID %>").get_textBoxValue();
$find("<%= txtShippingZip.ClientID %>").set_value(text);
}
It all works except the combobox copy part. Both comboboxes are bound to the exact same collections. How do I make this work?