VK said:
If the current window has been *open via script* on the main page,
then:
<a href="noScript.html" onclick="window.close();">CLOSE</a>
will work on any decent browser.
However, there is exactly no use to provide a "close link" that will only
work if client-side scripting is enabled. Nothing is accomplished by
directing the user to a document that states "we are sorry that the window
could not be closed because client-side scripting is not present", and
telling him how to close the window. Maybe he do not even have one, maybe
he has a tab or something else; anyway, such a description would have to
include procedure on all conceivable UAs which is just not possible.
Such links are better to be generated _via_ scripting so that in the
unlikely event (given proper search engine optimization) someone finds the
"popup" document through a search engine, or in the more likely event that
the document is accessed through a gracefully degrading link, those users
are not bothered with virtually useless links.
<script type="text/javascript">
document.write(
'<a href="#" onclick="window.close(); return false;">CLOSE<\/a>');
</script>
PointedEars