Click to See Complete Forum and Search --> : "Singeltone" window
gtekAmir
03-27-2006, 02:44 AM
Hello.
Is there any way to open specific window only once ?
I have some URL that I want the user to open only one instance of.
I don't want to use modal window as the user can do other things while window is open.
thanks.
hyperlisk
03-27-2006, 03:04 AM
You can do something like this:
<html>
<head>
<title>One Instance</title>
<script language="JavaScript">
myWin = false;
function doWindow(){
if(!myWin){
myWin = window.open("http://www.nicksscripts.be","");
}
if(myWin.closed){
myWin = window.open("http://www.nicksscripts.be","");
}
}
</script>
</head>
<body>
<input type="button" onClick="doWindow()" value="Open the Window">
</body>
</html>
gtekAmir
03-27-2006, 03:26 AM
Is there any way to do it without using HTML ?
something in the window.open properties ?
Thanks.
hyperlisk
03-27-2006, 11:30 AM
What do you mean? It doesn't need HTML, I just have the button there to start the event. You could use any event handler.