Reputation: 315
I'm opening a window using this javascript:
function popitup(url) {
newwindow=window.open(url,'name','height=430,width=780,scrollbars=1,resizable=1');
if (window.focus) {newwindow.focus()}
return false;
}
I need to close this popup from the popup window itself using a close button, I tried this but it didn't work:
onClick="window.close()"
How can I achieve this?
Upvotes: 0
Views: 114
Reputation: 660
try this putting an anchor tag on the popup
<a href="JavaScript:window.close()">Close</a>
Upvotes: 1