|
|
Q324 When attempting to change the location of a frame in a window that has just been opened it sometimes fails with window.frame has no properties, why?
irt.org | Knowledge Base | JavaScript | Frame | Q324 [ previous next ] Q324 When attempting to change the location of a frame in a window that has just been opened it sometimes fails with window.frame has no properties, why?What has happened, is that the window or the frame has not yet been created. You can work around this in two ways. Either introduce a delay when changing the location using the setTimeout method to change the location after, say, 1 second. Or use a derivative of the Re-directing access within Frames article. First when opening the window that holds the frameset, pass an encoded url, i.e. apage.html:
And then in the frame.html frameset:
|
-- div -->
|