<head>
<script language="javascript" type="text/javascript">
function openMe()
{
var win = window.open("about:blank");
var str="";
for(var a in win){
str+=a+"<br/>";
}
document.getElementById("data").innerHTML = str;
win.document.write("Karandeep Singh");
}
</script>
</head>
<body>
<div>
<input type="button" value="OK" onclick="openMe()"/>
</div>
<div id="data">
</div>
The above code is open a document and write on it. but it is not working in safari.