Skip to content

Tag: iframe

Prevent PDF auto download by idm using pdf.js

I’m using PDF.Js to embed PDF file for preview, and I removed the script of download and open files from the viewer.js , but when I test the page and PDF file try to show, the Internet Download Manager download it and abort the preview .. after search I found that using object instead of iframe may solv…

Set URL to load iframe in a Django template

I want to load an iframe into a Django template. The template is getting loaded correctly, but in place of the iframe, the template itself is getting embedded inside the parent template. The code relevant is given below: testgame.html is a file located in the same directory as this HTML template, but it doesn…

Embedded YouTube videos won’t replay

Strange one: embedded YouTube videos, once played (either by clicking ‘play’ or autoplaying on page load) will not play again. I’m using the standard iFrame embed copied straight from YouTube. This happens with several different short videos and across all browser/OS combinations I’ve …

Creating an iframe with given HTML dynamically

I’m trying to create an iframe from JavaScript and fill it with arbitrary HTML, like so: I would expect iframe to then contain a valid window and document. However, this isn’t the case: > console.log(iframe.contentWindow); null Try it for yourself: http://jsfiddle.net/TrevorBurnham/9k9Pe/ What …