I have a popup window called myWindow and when it pops up i want the focus to be on the original window, not the popup. I took out the line myWindow.focus();
and it still focused on the popup. Does anyone know how to keep the focus on the original window when the popup is created? Live Long and Prosper.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>This is 'myWindow'</p>");
myWindow.focus();
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()" />
</body>
</html>