Hi
Here is the code for opening popup
<script language ="javascript">
function popup1(){
window.open("popup.jsp",null,"height=200,width=400 ,status=yes,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body>
<input type ="text" value ="Test"/>
<input type="submit" value ="Submit" onClick ="popup1();"/>
</body>
Here is the code where the two request will takes place together
<%
String submitted = request.getParameter("submitted");
boolean submit = false;
if(submitted != null){
submit = true;
}
%>
<script language="javascript">
function focusWindow(){
window.focus();
}
</script>
<%if(submit){
%>
<body onload = "focusWindow();">
Sucessfully submitted
</body>
<%}
else
{%>
<form action = "sub.do">
<input type ="hidden" value ="submit"/>
<input type="submit" value ="Submit"/>
</form>
<%}%>
i have tried window.focus(), this.focus(), self.focus() and all the ways related to focus(). But nothing helps me