Jump to content

Get Location of Window


codefossa

Recommended Posts

I'm havin' problems tryin' to get the location of a window I open.  I've tried ..

 

var tab = window.open('http://google.com', '_blank');
alert(tab.location);

 

Along with a few other ideas.  I know you can change it's location with

 

tab.location = 'http://example.com';

 

but it don't seem to let me grab the location.

 

Before someone points out how stupid it sounds to grab the location of a window you set the location to, the page I'm using uses a header redirect, and I need to use Javascript to get the new location.  It's a script added to each page with Greasemonkey to modify a site I use.

Link to comment
https://forums.phpfreaks.com/topic/247157-get-location-of-window/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.