I'm trying to create a "Same As Shipping" Button that's seen on many online ordering platforms that, when clicked/checked during the billing step of the transaction, imports the information from another page. I looked at the other question on this topic and didn't find anything helpful. I do know that the two pages fall under the Same Origin Policy.
I've got the Javascript code created to populate the billing page with information. However, I cannot find a way to bring the value from the other page.
<script language="JavaScript">
function SameAs(){
document.getElementById("FIELD_4").value = "752";
document.getElementById("FIELD_6").value = "50";
}
</script>
My problem is that I can't bring down the element from the previous page to use as the value.