-
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
-
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks