Advanced Search

Results 1 to 2 of 2

Thread: Get child window url in parent window

  1. #1
    Join Date
    Jan 2012
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Get child window url in parent window

    Hello,


    I use window.open() to open third party url in pupop window. Now i want to identify the url of my child window change or not in my parent window code.

    How can i do it please help me.

    I use below code for open window.

    <script>
    var windowObjectReference;
    var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes,outerWidth=1200,width=500,innerWidth=800";
    var PreviousUrl;

    function openurl(url)
    {
    PreviousUrl = url;

    if(windowObjectReference == null || windowObjectReference.closed)
    {
    windowObjectReference = window.open(url, "mywindow",strWindowFeatures);
    windowObjectReference.focus();
    }
    else if(windowObjectReference.document.location != url)
    {
    windowObjectReference.close();

    }
    }
    </script>

    I want to close child window on change of child url.


    help me please.

    Thanks in advance.
    crish

  2. #2
    Join Date
    May 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am not sure whether you can do it.


    I always do this type of things by iframe. It is easy to conduct each other in parent or child window.


    If you want conduct in totally non-relative windows. May be you can't just use javascript.

Tags for this Thread

Bookmarks

Posting Permissions

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