my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes iFrame src doesn't update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "iFrame src doesn Watch "iFrame src doesn New topic
Author

iFrame src doesn't update

Andrew Carney
Ranch Hand

Joined: Oct 17, 2006
Posts: 96
Hello,

I am opening the following HTML page from a parent window:



If window.opener.closed is false then the script runs as expected however if window.opener.closed is true it doesn't change the src attribute of the iFrame and doesn't close the window. Any idea why?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

.src not .location


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Andrew Carney
Ranch Hand

Joined: Oct 17, 2006
Posts: 96
.location is also valid.
Anyway have already tried .src and I get the same behaviour.
What's more important the self.close doesn't haoppen either in this case.
Could this be because I'm opening this window from a parent one although shouldn't matter in this case AFAIK.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

If it doesn't reach that point because of an error, the rest of the function will not execute. What have you done to check for JavaScript errors?
Andrew Carney
Ranch Hand

Joined: Oct 17, 2006
Posts: 96
I've activated javascript error reporting on the browser and it reports nothing.
This code is pretty straight forward so I guess anyone can just try himself.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are your test pages really in another domain?

Eric
Andrew Carney
Ranch Hand

Joined: Oct 17, 2006
Posts: 96
Hi Eric,

What do you meant by "test pages".
If you ask about the parent and the child then they both reside in the same application and therefore in the same domain.
I'm opening this child page using relative address.

Roy
 
 
subject: iFrame src doesn't update
 
Similar Threads
JSP Invoking another JSP in Iframe
File upload cancelation
Java scriptlet not executing in Iframe
Iframes height problem
How to explicitly trigger another frame's onunload event function