JustinMs66
07-11-2007, 09:11 PM
i have successfully dynamically created an iframe object using only javascript. i couldn't get createElement() to work so i ended up just using innerHTML+= and then the actual html code. all in all, it works.
var iframehtml = '<iframe src="http://google.com"></iframe>';
document.getElementById('iframeholder').innerHTML=iframehtml;
now what i want to do is add a onload listener. once the iframe has successfully loaded the url, do something.
how would i go about doing that?
var iframehtml = '<iframe src="http://google.com"></iframe>';
document.getElementById('iframeholder').innerHTML=iframehtml;
now what i want to do is add a onload listener. once the iframe has successfully loaded the url, do something.
how would i go about doing that?