<html>
<head>
<script type="text/javascript">
function openmywindow()
{
mywin=window.open('','','width=100,height=100');
mywin.document.write("<p>My name is Mahak</p>");
mywin.focus();
mywin.opener.document.write("<p>This is the Main Window</p>");
}
</script>
</head>
<body>
<input type="button" value="Click Me!!!" onclick="openmywindow()" />
</body>
</html>