Onepage Checkout Error – Fix Uncaught TypeError: Cannot Set Property ‘Checked’ of Null

ce-1.9.0.1onepage-checkout

I've upgraded a magento site from 1.6 to 1.9 and applied the rwd theme to the site. On the checkout after entering the billing information and clicking on either Ship to same address or ship to a different address the delivery box is blank and there no way moving forward.

I found the error causing this to be Uncaught TypeError: Cannot set property 'checked' of null and the lines for checked to be

<li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" title="Deliver to this address" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes">Deliver to this address</label></li>
        <li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0" checked="checked" title="Deliver to different address" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no">Deliver to different address</label>
        </li>

I've done some google search to try and find any solutions to this but nothing which has helped me in the right direction

I've checked the magento error logs and can't see any signs to help me resolve this error further.

Update:
I've uploaded a clean copy of RWD to make sure it wasn't due to missing elemental from the theme but still getting the same errors.

Best Answer

It seems like it can't find the element with id="shipping:same_as_billing". Are you sure you copied the theme correctly? You may need to update the templates in your custom theme. Try switch to rwd/default and see if the problem persists.