I am using the iframe tag and it has an image embedded in it. This is my code:
https://jsfiddle.net/uLsg1pw9/7/
My first problem is that the iframe doesn't auto adjust its height and width depending on the picture. I have to scroll through the frame to see the full picture. I want the iframe itself to have the whole picture. I tried this: make iframe height dynamic based on content inside- JQUERY/Javascript
ARiframe.height = ARiframe.contentWindow.document.body.scrollHeight + "px";
but that did not seem to do the trick.
My second problem is that when I click on the picture, it does reload the iframe (as expected) but the image disappears. What happened to the image and how do I prevent it from disappearing?