How can I change the size of an iframe from inside?
When you create an IFRAME the browser automatically adds a ‘window’ object for the IFRAME inside the ‘window’ object of main page. You need to change the size of the IFRAME instead of the size of the document. Try this code: For JavaScript: window.parent.document.getElementById(‘myframe’).width=”500px”; window.parent.document.getElementById(‘myframe’).height=”500px”; And for jQuery: $(‘#myframe’, window.parent.document).width(‘500px’); $(‘#myframe’, window.parent.document).height(‘500px’);