Questions tagged [window.parent]

The window.parent is a reference to the parent window of the window that this script is executed in.

The window.parent is a reference to the parent window of the window that this script is executed in. The window.parent can be used when in a frame or iframe - in all other cases there is no parent window, and that reference will be undefined.

21 questions
7
votes
1 answer

Firefox window.parent.location

I've a Html page index.htm which has an iframe to page search.htm the search.htm has code like this function executeSearch() { window.parent.location = "/SearchResults.aspx?t=" + txt_Search.value; } this code executed now from…
Mustafa Magdy
  • 1,096
  • 4
  • 23
  • 39
2
votes
0 answers

postMessage from child to parent window in Safari using window.open

I'm using window.open(...) to open a completely new window (same domain, same subdomain, same directory, same everything, but a different .html file). In the child window, I'm using this to send messages back to the…
Steverino
  • 1,525
  • 3
  • 18
  • 34
2
votes
3 answers

Why does window.parent self-reference?

I understand from documentation and several related StackOverflow posts that window.parent, if there is no other parent, will self-reference and thus never be undefined. I can't seem to find a decent reason as to why this is. JavaScript does have…
Cellivar
  • 530
  • 9
  • 27
2
votes
1 answer

mraid.expand() not working properly in DoubleClick studio

I'm trying to upload a mraid project to Google's DoubleClick studio and notice the mraid.expand() event is not working properly. The ad is meant to be an in-app expandable banner, and basically after the very first time, mraid.expand() will not…
beichenfan
  • 141
  • 1
  • 6
1
vote
1 answer

IE8+, window.open(url/#/frag,'_parent') vs. parent.location.href=url/#/frag in iframe

I have a site that loads an iframe. Code in the parent window registers an onbeforeunload listener. Currently the iframe contains a button with a click handler that fires off: window.open(/#/frag,'_parent') In all browsers I have tested (besides…
mjj1409
  • 2,826
  • 3
  • 26
  • 27
1
vote
3 answers

Legacy code: window.parent.location.href="https:/home"

I have inherited some code from our former developer and I found this piece of code. loginAction->isAuthenticated()){ ?>