get parent window after 5 or so seconds?

Results 1 to 2 of 2

Thread: get parent window after 5 or so seconds?

  1. #1
    Join Date
    Dec 1969

    Default get parent window after 5 or so seconds?

    i&#039;m opening a child window and want to check the parent window to see if the domain has changed after certain about of time? can this be accomplished?<BR><BR>I&#039;m opening the child window on the onUnload in the parent. This code is in the child window. Getting caught on parent_url, not revaluating. All this is occuring on client-side<BR><BR>function cookie_Decider()<BR>{<BR> setTimeout("check_URL()",5000);<BR><BR>}//end function<BR><BR><BR><BR>function check_URL()<BR>{ <BR> var run_move=false;<BR> var parent_url = null;<BR> parent_url=new String(window.parent.location);<BR>// test parent_url=new String("");<BR>// nope parent_url=new String(window.parent.history(0));<BR>// nope parent_url=new String(parent.url.value);<BR> var parent_url2 = parent_url.substr(7,10);<BR> var server_name = "&#060;%=server_name%&#062;";<BR> var server_name2 = server_name.substr(0,10);<BR><BR> if(server_name2.match(parent_url2)==null &#124&#124 window.parent.closed)<BR> {<BR> alert("true");<BR>// run_move=true;<BR> }<BR> else<BR> { <BR> window.location.reload();<BR> <BR>// run_move=false;<BR> }<BR> <BR> <BR> if(run_move == true)<BR> { <BR> alert("run=True");<BR>// window.moveTo(300,100);<BR>// window.focus();<BR> }<BR>// }//end else<BR>}//end function<BR>

  2. #2
    Join Date
    Dec 1969

    Default **CROSSPOST** Post is in JScript Forum


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts