Forum Moderators: open

Message Too Old, No Replies

Preventing unloading of a frameset

         

bluedalmatian

6:13 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



I'm trying to prevent a page within a frame removing the frameset by loading a link in _top by using the following code:

<script language="JavaScript">
function onul()
{
top.location.href = location.href;
}
</script>
<frameset rows="0,*" frameborder="no" border="0" framespacing="0" onUnload="onul()">

the function executes but the statement to change the location doesn't have any effect.

what am i doing wrong?

kaled

7:33 pm on Mar 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unless you can come up with a plausible white-hat explanation as to why you wish to do this, I suspect help may not be forthcoming.... It sounds as though you wish to prevent framebreaker scripts working - this suggests that you are framing other people's sites.

For what it's worth, this may be impossible - it certainly should be impossible.

Kaled.

bluedalmatian

8:48 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



No actually we use a webmail service which insists on kicking the user out of a frameset when they log out and re-directing them to another site. We want to put acces to the service in a frameset to provide a simpler log in interface - something which they allow you to do and provide the code to do it, but we also want to redir3ct people back to OUR site when they log out.

kaled

8:38 am on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might be able to do something using the frameset's onunload event. I've never had cause to use this so I'm unsure of its behaviour.

Kaled.