CalifNina
06-01-2003, 12:16 PM
Hello, first post here. I'm new to JavaScript and been playing with it for just a few days now ... am at an impass. Situation is this ... From my main page I have a button to open a second window ... that code works fine and is as follows (in case you need to see it to determine problem):
Inside Main Page HEAD section:
<SCRIPT TYPE="text/javascript">
function openWindow()
{
window.open("wks2notes.html","myWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory= yes,width=400,height=400")
}
</SCRIPT>
Inside Main Page BODY section:
<FORM>
<INPUT TYPE="button" VALUE="Workshop Notes" onclick="openWindow()">
</FORM>
From this, the new window comes up fine and displays the contents properly. A Close button displays at the bottom of the second window, but when depressed --> nothing happens. This is what I need to fix. Here is the code from the second window:
Inside Second window HEAD section:
<SCRIPT LANGUAGE="JavaScript">
function closeWindow()
{
myWindow.close()
}
</SCRIPT>
Inside Second window BODY section:
<FORM>
<INPUT TYPE="button" VALUE="Close Window" onclick="closeWindow()">
</FORM>
I've tried various modifications to no avail. Can someone see what I am obviously doing wrong? I do not see it. Anything anyone can offer?
Thanks so much,
~ CalifNina
Inside Main Page HEAD section:
<SCRIPT TYPE="text/javascript">
function openWindow()
{
window.open("wks2notes.html","myWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory= yes,width=400,height=400")
}
</SCRIPT>
Inside Main Page BODY section:
<FORM>
<INPUT TYPE="button" VALUE="Workshop Notes" onclick="openWindow()">
</FORM>
From this, the new window comes up fine and displays the contents properly. A Close button displays at the bottom of the second window, but when depressed --> nothing happens. This is what I need to fix. Here is the code from the second window:
Inside Second window HEAD section:
<SCRIPT LANGUAGE="JavaScript">
function closeWindow()
{
myWindow.close()
}
</SCRIPT>
Inside Second window BODY section:
<FORM>
<INPUT TYPE="button" VALUE="Close Window" onclick="closeWindow()">
</FORM>
I've tried various modifications to no avail. Can someone see what I am obviously doing wrong? I do not see it. Anything anyone can offer?
Thanks so much,
~ CalifNina