Forum Moderators: open

Message Too Old, No Replies

AJAX Iframes

         

Shawazi

12:53 am on Jun 12, 2007 (gmt 0)

10+ Year Member



Why would an iframe become unaccessible after creating, destroying, and then re-recreating it? On the first creation I can access it fine with this line:

//obj gets HTML with the IFrame
obj.innerHTML = object.ResponseText;

//access iframe
var myFrame = window.frames['frameName'];

//access DIV inside iframe
var myDIV = myFrame.document.getElementById('innerDIV');

I then do this:


obj.innerHTML = "";

Then I can toggle to re-rerun the first code block which will then no longer work.

(i am using an iframe to have a file upload on the page without refreshing it)

colandy

11:31 am on Jun 12, 2007 (gmt 0)

10+ Year Member



r u saying that the AJAX code only works once..?