i am developing a chat application i need a javascript function to open seperate window for each online users now i am using following javascript code
var myWindow;
function openWindow(url)
{
var width = 700;
var height = 500;
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));
var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable=no,scrollbars,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
myWindow = window.open(url, "welcome", windowFeatures);
}
and i have called this function in code behind as follows
<a href='javascript:void(0)' onclick=openWindow('newWindow.aspx?id=" & Id & "')> </a>
here the id is users ID but new window is replaced in same window where i am doing wrong please guide me Thanks