aayybb
Oct 30th 2008, 6:45 am
Hi,
I have the following short code and the window.status line doesn't work for me. It doesn't seem to be == "Done". The window.open and window.location work and it shows a image for me. Can anybody tell me what I did wrong on the window.status?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>search animation</title>
<script type="text/javascript">
function open_win()
{
myWindow=window.open('','MyName','width=120,height=100');
myWindow.window.location="http://abc???.com//???/search_animate.html";
myWindow.focus();
var dd ="Done";
if (myWindow.opener.window.status == dd)
myWindow.opener.document.write("done")
else
myWindow.opener.document.write("This is the parent window")
}
</script>
</head>
<body>
<form>
<input type="button" value="Start count!" onClick="open_win()">
</form>
</body>
</html>
I have the following short code and the window.status line doesn't work for me. It doesn't seem to be == "Done". The window.open and window.location work and it shows a image for me. Can anybody tell me what I did wrong on the window.status?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>search animation</title>
<script type="text/javascript">
function open_win()
{
myWindow=window.open('','MyName','width=120,height=100');
myWindow.window.location="http://abc???.com//???/search_animate.html";
myWindow.focus();
var dd ="Done";
if (myWindow.opener.window.status == dd)
myWindow.opener.document.write("done")
else
myWindow.opener.document.write("This is the parent window")
}
</script>
</head>
<body>
<form>
<input type="button" value="Start count!" onClick="open_win()">
</form>
</body>
</html>