views:

68

answers:

2

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>
+1  A: 

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>
Diodeus
That does not work either.
Andrew Hare
Yes, I blindly copied the poster's script, spaces included. Duh. Scarlet Garden has it right.
Diodeus
That's acutally not the answer for the question, but indeep a good advise...
Hippo
+3  A: 

I just removed the spaces and it works well :

<a href="javascript:self.close()">Close this Window</a>
Canavar