Subject: iframe onLoad
Posted By: darkhalf Post Date: 1/11/2006 3:15:35 PM
I have this iFrame, that when it loads, changes the page, etc.. called the testLoader() function, which for now is only an alert box.
<iframe src="about:blank" onLoad="testLoader();"></iframe>

The issue is that when I on the fly create the iFrame, the onLoad function doesn't trigger the testLoader function.. I have changed the page of the iframe in hopes of getting the alert but to no avail.

function createIframe(id,app)
{
//method 1
 nIframe = document.createElement("iframe");
 nIframe.id = id
 nIframe.attachEvent('onLoad',app);
 document.body.appendChild(nIframe);

//method 2
 nIframe = document.createElement("<iframe id='" + id + "' onLoad='" + app  + "'></iframe>");
 document.body.appendChild(nIframe);
}

If anyone has any idea, please let me know...

Reply By: darkhalf Reply Date: 1/11/2006 3:42:58 PM
Disregard, I found my mistake...


Go to topic 38611

Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393
Return to index page 392
Return to index page 391
Return to index page 390
Return to index page 389
Return to index page 388