PDA

View Full Version : script causing security problems



dwsmark
10-27-2005, 10:23 PM
<a href="javascript:window.close()">close this window</a>

This short line which was used in many scripts is now causing errors in Foxfire and IE. Please help me with what I need to change. TIA

jscheuer1
10-28-2005, 04:26 AM
In modern browsers you can only close a window using javascript if you opened that window using javascript. In IE, there is a kludge:


<a href="javascript:window.opener=self;window.close()">close this window</a>

But this will not fool FF. I have no idea what devious minds found a way to exploit the window.close() method on non-javascript generated windows for personal gain or malicious purposes or what those objectives were but, apparently it has happened enough times that we are now left without this handy tool except for windows we've created using javascript.