Check properties of one window from another?
Moderator: General Moderators
Check properties of one window from another?
I'm trying to use a popup window (yes I hate them too, but the way I'm doing what I'm doing it's necessary) to determine the parent.location of the window it spawned from, does anybody know how I can do this? I'm not very good with JavaScript.
Hi.
In the pop-up window add this code..
That should do the trick I think.
In the pop-up window add this code..
Code: Select all
<script language="JavaScript">
my_parent=window.opener.location;
</script>Yep.. I normally use this code to check for something within a piece of text..
Hope this helps.
Code: Select all
<script language="JavaScript">
this_text="check_for_BOB_in_this_text";
check_for="BOB";
if (this_text.indexOf(check_for)<0)
{
// Nothing has been found
}
else
{
// It has been found so do something here
}
</script>Hope this helps.