I'm just trying to find out if a popup window exists. I thought you could do this someway by referencing the name of the popup. Also there maybe more than one popup each with a different name. The creation of the popups is from some js code that keeps getting cycled.
By name I mean the myWindow part in for e.g. window.open("sompage.asp","myWindow",...)
All examples i see centre on the my myWin part in for e.g. var myWin=window.open .... which is how I currently open, but since there could be multiple windows open how can i reference individual windows which have different names assigned (the myWindow part is different for each window).
Also I need to be able to reference the popup if the user moves to another page in the parent window.
This is the code and the problem is occasionally if the main window finds a comment before the popup then it will open a new window
function state_Change(){
if (xmlhttp.readyState==4){
var to1
var name
if(xmlhttp.responseText!=""){
var p=xmlhttp.responseText
aData =p.split("|")
to1=aData[0]
name=aData[1]
if(to1!=0){
newwin = window.open('im_message.asp?to='+ to1 +'&name='+name,name+to1,'width=300,height=400')}
}}}
By name I mean the myWindow part in for e.g. window.open("sompage.asp","myWindow",...)
All examples i see centre on the my myWin part in for e.g. var myWin=window.open .... which is how I currently open, but since there could be multiple windows open how can i reference individual windows which have different names assigned (the myWindow part is different for each window).
Also I need to be able to reference the popup if the user moves to another page in the parent window.
This is the code and the problem is occasionally if the main window finds a comment before the popup then it will open a new window
function state_Change(){
if (xmlhttp.readyState==4){
var to1
var name
if(xmlhttp.responseText!=""){
var p=xmlhttp.responseText
aData =p.split("|")
to1=aData[0]
name=aData[1]
if(to1!=0){
newwin = window.open('im_message.asp?to='+ to1 +'&name='+name,name+to1,'width=300,height=400')}
}}}