Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iFrame src doesn't update

 
Andrew Carney
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.src not .location
 
Andrew Carney
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.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
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are your test pages really in another domain?

Eric
 
Andrew Carney
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic