Can I create an empty iframe as a placeholder to later insert html into it?
In otherwords, suppose I have an empty iframe with an id,
How do I insert html in it?
I'm using jquery, if that makes it easier.
Can I create an empty iframe as a placeholder to later insert html into it?
In otherwords, suppose I have an empty iframe with an id,
How do I insert html in it?
I'm using jquery, if that makes it easier.
jsfiddle example here
HTML :
JS
View the source of this page: http://mg.to/test/dynaframe.html It appears to do exactly what you want to do.
Yes I know that is possible but the main problem is that we cannot handle a frame from outside it i has already loaded some other thing.
but if we start as
Then its impossible to hit that out.
You can do it without jQuery also:
jQuery's html strips body, html and head tags from the inserted HTML.
No it's not. You would modify the script like this: