Forum Moderators: open
Second,
I have an <IFRAME>:
<IFRAME WIDTH="600" HEIGHT="0" FRAMEBORDER="0" ID="cart" NAME="cart" SRC="http://www.example.com"></IFRAME>
I want the IFRAME to show (so change the height to 600) when a submit button is clicked (so onclick() for the button or onsubmit() for the form).
I have tried numerous snippets of code within the onsubmit() and onclick() along the lines of:
document.getElementByID('cart').height = 600;
document.getElementByID('cart').style.height = 600;
document.getElementByID('cart').height = '600';
document.getElementByID('cart').style.height = '600';
document.getElementByID('cart').height = 600
document.getElementByID('cart').style.height = 600
document.getElementByID('cart').height = '600'
document.getElementByID('cart').style.height = '600'
document.cart.height = 600;
document.cart.style.height = 600;
document.cart.height = '600';
document.cart.style.height = '600';
document.cart.height = 600
document.cart.style.height = 600
document.cart.height = '600'
document.cart.style.height = '600'
Nothing seemed to work for me. Typical error message was... "Object doesn't support this property or method"
Anyone know where I am messing up? I have also tried using the .style.display = 'none', but I don't seem to be doing that right either.
Thanks.
You need to read this, iframe apparently has width but NO height, plus more.
As for js percent, does anyone expect cart sites to work without it, I don't think many sites would.