PDA

View Full Version : Window closing and opening



allyson
Jun 30th, 2002, 05:08 AM
Hi

I am trying to close a frameset window, and open another file in a new window. I am using the following function which does not seem to work:

<script language="javascript">

function backpalette() {
window.top.close();
window.open('../entry');
}
</script>

It is called by

href="javascript:backpalette()"Close frame"

What am I doing wrong?

bye
Allyson

joh6nn
Jun 30th, 2002, 11:12 AM
try switching the commands around.

function backpalette() {
window.open('../entry');
window.top.close();
}

allyson
Jul 1st, 2002, 02:10 AM
Hi

I am still having problems with this script. I know it's a simple problem, but I just can't find the solution. When the user clicks on the arrow, the frameset should close, and entry.htm should be loaded. Have a look at the website so far, http://homepages.ihug.co.nz/~usateden/panacea/frameset/


<script language="javascript">

function back() {
window.open('../entry.htm');
window.top.close();
}
</script>
</head>

<body background="bg.GIF" bgproperties="fixed">
<div align="right">

<table border="0" cellpadding="0" width="90%">
<tr>
<td width="100%"><p align="left"><a href="javascript:back();"><img src="backarrow.gif"


Can anyone help with this please?

bye
Allyson