Reputation: 46591
I have this bit of html code, but when I click the link, it does not close:
<html>
<head>
<title></title>
</head>
<body>
<h2>Members Only</h2>
<p>You must be a member.</p>
<p>Please Sign In or Create an Account.</p>
<a href="javascript: self.close ()">Close this Window</a>
</body>
</html>
Upvotes: 0
Views: 436
Reputation: 48088
I just removed the spaces and it works well :
<a href="javascript:self.close()">Close this Window</a>
Upvotes: 3
Reputation: 114367
Popups suck, use a modal dialog instead, especially for something as simple as a notification.
That being said, try this:
<a href="javascript:window.close()">Close this Window</a>
Upvotes: 1