It doesn't return any error
my code as the following:
<input type="button" value="close" onclick="window.close();"/>
If you are using older version of firefox it should work. But for higher versions above 2.2 it wont work I think.
Can you please try this
Let me know if you have any luck with this please..