Jump to content

iFrame Source With JavaScript - Opera


gookymedia

Recommended Posts

Hi

 

Why does this code not work in Opera? The src never seems to be set, works fine in Firefox etc:

 

<iframe id="hidden_iframe" name="hidden_iframe" src=""></iframe>
<script type="text/javascript">


document.getElementById ('hidden_iframe').src = 'http://www.jointsocial.com/cometwire.php';	



</script>

Link to comment
https://forums.phpfreaks.com/topic/220237-iframe-source-with-javascript-opera/
Share on other sites

I'm using Opera 10.63 under Linux, and I've just run a few tests using IFRAME.  First of all, according to (the book) Dynamic HTML setting .src is a legitimate way to load a page into an IFRAME, and I can confirm it works under FF and Opera.  Supposedly it's level-1 DOM and works all the way back to IE4.

 

Secondly, how are you confirming that nothing is loading into the IFRAME?  Via code or visually?  If the URL of the document and the IFRAME don't share the same domain, you're not going to be able to access the IFRAME properties because of Same Origin Policy.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.