Hi
I have got an advertisment page that will either open a new window if the advert is external to the website or change the current website page if the link is internal. What i want to be able to do is to check if the main website window is still open before executing the link to the internal web page to stop a javascript error that appears.
What i have at the moment is this:
function openAdvert(URL)
{
window.opener.location=URL;
window.opener.focus();
}
if the opener window has already been closed this is where i get the javascript error. Can i check to see if this window is still open ?
Thanks in advance
I have got an advertisment page that will either open a new window if the advert is external to the website or change the current website page if the link is internal. What i want to be able to do is to check if the main website window is still open before executing the link to the internal web page to stop a javascript error that appears.
What i have at the moment is this:
function openAdvert(URL)
{
window.opener.location=URL;
window.opener.focus();
}
if the opener window has already been closed this is where i get the javascript error. Can i check to see if this window is still open ?
Thanks in advance