This seems to work for me (no AJAX):
ParentWindow.aspx:
<form id="Form1" method="post" runat="server">
<input type="button" onclick="onButtonClick();" value="Open Window">
<div id="messageDiv"></div>
</form>
<script type="text/javascript">
<!--
function onButtonClick()
{
document.getElementById('messageDiv').innerHTML = 'Please wait...';
var uniqueId = 'NewWindow_' + new Date().getTime();
var windowFeatures =
'channelmode=no,directories=no,fullscreen=no,' +
'location=no,dependent=yes,menubar=no,resizable=no,scrollbars=no,' +
'status=no,toolbar=no,titlebar=no,' +
'left=100,top=100,width=400px,height=200px';
windowRef = window.open('WebForm2.aspx', uniqueId, windowFeatures);
window.focus();
}
// -->
</script>
ChildWindow.aspx
<script type="text/javascript">
<!--
window.onload = function ()
{
window.focus();
}
// -->
</script>
But the best way to do this that I have found is to forget about the parent window and just use this little Custom Control that I posted a while back in the child window http://forums.asp.net/1108609/ShowPost.aspx
NC...