Click to See Complete Forum and Search --> : Popup window is getting minimized


sreenath205
March 7th, 2005, 03:10 AM
Hi

I have a main window with a button and when i click on it it opens another window, after which i have given an alert message when this alert comes the popup window gets minimized.How to stop this??

This is my code



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>
<script language="javascript">

function test(){
var win=window.open();
alert("hi");
}
</script>

<body>
<form name=f1>

<input type="button" value="click" onClick="test()">

</form>
</body>

</html>



When the alert "hi" comes the window which is opened gets minimized .How to stop that :rolleyes:

Thanks
Sreenath

aquafin
March 7th, 2005, 04:29 AM
"When the alert "hi" comes the window which is opened gets minimized .How to stop that"

srinath,

But the window is not getting minimized, i am using IE version 6.0

You can try this:
put the alert message before the window popup statement,

regards,

manju

anupam kant
March 7th, 2005, 09:26 PM
try this:


<script language="javascript">

function test(){
var win=window.open();
win.focus();
}
</script>