...

View Full Version : closing framesets



allyson
07-05-2002, 08:49 AM
Hi

I'm having problems in closing my frameset and then loading a new html file into the window. I've discovered that window.close() does not close frameset windows.

Has anyone used

int sm_jclose( void );

I've tried using this in the website I am designing but it still does not work.

bye
Allyson

glenngv
07-05-2002, 09:28 AM
to close a frameset, top.close()
but if you just want to load a new html without frames from a frameset page, no need to close it, just:
top.location.href='new.htm'

allyson
07-05-2002, 09:55 AM
Hi

I tried using top.location.href='....' but it still does not work when the function is called. The website that I'm designing is at http://homepages.ihug.co.nz/~usateden/panacea/frameset Is the function in the wrong place, maybe it should be in <body>.

The arrow, saying 'Back to Palette' calls up the navart() function, but nothing happens. In IE, and error message is generated. Any more suggestions to solve this problem would be greatly appreciated. I'm determined to solve it.

<script language="javascript">


function navart() {
top.location.href='http://homepages.ihug.co.nz/~usateden/panacea/entry.htm';
}


</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:navart()"><img src="backarrow.gif"



bye
Allyson

winlineau
07-05-2002, 10:01 AM
<a target="_top" href="http://homepages.ihug.co.nz/~usateden/panacea/entry.htm"><img src="backarrow.gif"></a>

glenngv
07-05-2002, 10:55 AM
winlineau's suggestion will also work.
But it's weird that your existing solution doesn't work. It should work. The error says, 'Object expected' but the function navart() is existing and I see no typo error. Can you insert an alert() inside the navart() function to see if it's executed before the error appears?

allyson
07-05-2002, 11:57 AM
Hi

Thank-you. I tried alert() and discovered that navart() was not functioning. I don't know why.

But target='_top' worked well, and does exactly what I wanted. So, thankyou

bye
Allyson



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum