I'm trying to setup so when checkbox is true it copies values from one to another and that works when not using the if statement i have below. Then when it is unchecked i want it to be empty fields for the most part i think i have it right but its not doing anything.
document.RMARequest.CompanyInfo_Ship_CompanyName.value = document.RMARequest.CompanyInfo_Bill_CompanyName.value
document.RMARequest.CompanyInfo_Ship_CompanyName.value = ""
<input type="checkbox" name="shiptosameasbillto" id="shiptosameasbillto" onclick="CopyText()">Same as Bill To