dgirl
01-25-2003, 06:47 AM
I am working on making a code that allows links on a page to be used differently based on whether the window was opened by another window, or if it exists on its own. When the window has been called by another window, I need the links to load into the window's opener. When the window exists on its own, the links should load into it normally. I tried accomplishing this with a if/then function in the head that l thought would check to see if there was a window.opener...but it does not seem to work. I was trying to accomplish this by allowing the variable today_page to change based on whether or not there was a window.opener.
Here is the function as it is (currently loads into the window.opener, but does not load at all when the page was not opened as a pop-up window):
var today_page;
if (window.opener)
{
today_page = window.opener;
} else {
today_page = self;
}
then individual links were called with:
<a href="#" onClick="today_page.location='today/deccontent27_02.html';">December 27 2002</a>
Any suggestions would be helpful!
Here is the function as it is (currently loads into the window.opener, but does not load at all when the page was not opened as a pop-up window):
var today_page;
if (window.opener)
{
today_page = window.opener;
} else {
today_page = self;
}
then individual links were called with:
<a href="#" onClick="today_page.location='today/deccontent27_02.html';">December 27 2002</a>
Any suggestions would be helpful!