Hi
I am doing a chating application.I want to know whether a window is opened or not.
This is the code i am using to open a window.
var title='Chat_'+userId+"_"+selectedUserId;
var url="OneToOneChat.aspx?FromUserId="+userId+"&FromUserName="+userName+"&ToUserId="+selectedUserId+"&ToUserName="+selectedUserName;
window.open(url,title,'width=410,height=400,toolbar=no,menubar=no,scrollbars=no,status=yes',false);
later i trying whether the window is already opened or not.
var win='Chat_'+userId+"_"+selectedUserId;
if(win.closed)
{
}
else
{
}
for win.closed it is giving javascript error like "closed is null or not an object".
I am using IE7.
Please h on this.
Thanks in Advance
Venki