0

Hi i want to resize an iframe by its content

  frame = document.getElementById(frameId);
  innerDoc = frame.contentWindow.document;
  objToResize = (frame.style) ? frame.style : frame;
  objToResize.height = innerDoc.body.scrollHeight + 10;

but when the iframe is on an other domain i get

Unsafe JavaScript attempt to access frame

is there any other way to do this?

wutzebaer
  • 13,422
  • 18
  • 88
  • 157
  • possible duplicate of [Unsafe JavaScript attempt to access frame in Google Chrome](http://stackoverflow.com/questions/5660116/unsafe-javascript-attempt-to-access-frame-in-google-chrome) – antyrat Jul 05 '12 at 10:56
  • See the following link for Cross Domain Iframe Resizing; [cross-domain-iframe-resizing](http://css-tricks.com/cross-domain-iframe-resizing/) – Ahsan Rathod Jul 05 '12 at 11:05

0 Answers0