Iframe
Code Used
<iframe id=”yardcart_iframe” marginheight=”0″ marginwidth=”0″ frameborder=”0″ src=”https://haulaway.myyard.co.uk/cart/ ” style=”width:722px;height:502px;border:0;margin-bottom:10px;”></iframe>
<script type=”text/javascript”>
if (typeof window.postMessage !== ‘undefined’) { // if postMessage is supported
var myyard_iframe = document.getElementById(‘yardcart_iframe’),
update_height = function (e)
{ var array = e.data.split(‘,’); myyard_iframe.style.height = parseInt(array[0]) + ‘px’; if (array.length > 1) window.location.hash = ‘#yardcart_iframe’; // scroll to the top of iframe }
;
myyard_iframe.setAttribute(‘scrolling’, ‘no’);
if (window.attachEvent)
{ // IE window.attachEvent(‘onmessage’, update_height); }
else
{ // Normal browser window.addEventListener(‘message’, update_height,false); }
}
</script>