Reloading a parents iframe from a child
I have two iframes on my page, frameOne and frameTwo. I'm trying to
refresh/reload frameOne from a script running in frameTwo.
function reload(){
srcLink = parent.document.getElementById('frameOne').src;
parent.document.getElementById('frameOne').src=srcLink;
}
This works but it refreshes to the initial value of the iframe. IE: If the
parent page loaded with that iframe's src set to 'google.com' but then
changed to (due to a user action) 'yahoo.com' my code will refresh that
page to 'google.com', the link it was set to when the page was loaded. I
would like to take into account the change of link and refresh that one.
No comments:
Post a Comment