[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window.open(), won't load lpage on first try



Doug Holton wrote:
> 
> > Is this a bug, or do I misunderstand window.open()?
> 
> This is a bug with macs, I believe.  Netscape won't open a location
> in a window that doesn't already exist.

Actually, this is a problem on Solaris 2.4 (NS 2.0b6) as well.  As for 
not being able to open a location into a window that doesn't exist, that 
isn't true. It works fine if you do the window.open(url,windowName) 
twice in a row. I have the following JavaScript working just fine on the 
Mac.

---------
<html>
<head>
<script language = "javascript">
function newWindow(url, name)
{
  w = window.open(url, name);
  w = window.open(url, name);
  return w
}

</script>
</head>
<body>
<form name="controlPanel">
<input type = "button" name = "open"     value = "Open" onClick = "w2 = 
newWindow('w2.html','w2')">
<input type = "button" name = "close"    value = "Close" onClick = 
"w2.close()">
<input type = "button" name = "clear"    value = "Clear" onClick = 
"w2.document.clear()">
</body>
</html>

-------

-- Robert 
____________________________________________________

Robert Thuleen
Sr. Software Engineer
Science Applications International Corp (SAIC)
San Diego, Ca

mailto:thuleen@mls.saic.com
http://www.saic.com
http://www.free.cts.com/crash/t/thuleen