How to Close Current Browser Window? [duplicate]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
This question already has an answer here:
window.close and self.close do not close the window in Chrome
12 answers
I would like to know how do I close the current browser window using javascript or any other language that enables this.
I have already seen the window.close () function but it does not work for my case because it only closes what was opened through window.open ().
I thank you for your help.
26/11/2018 - Coming back here to update
Many thanks for the beautiful help I had here and for the beautiful negative feedback in the question and for the markup as duplicated hahahaha (remembering that the similar questions are very old, which is not useful at the moment), without the beautiful help of the community I have developed a solution for what I needed :)
javascript php jquery html ajax
marked as duplicate by Nick, jeroen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 '18 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
window.close and self.close do not close the window in Chrome
12 answers
I would like to know how do I close the current browser window using javascript or any other language that enables this.
I have already seen the window.close () function but it does not work for my case because it only closes what was opened through window.open ().
I thank you for your help.
26/11/2018 - Coming back here to update
Many thanks for the beautiful help I had here and for the beautiful negative feedback in the question and for the markup as duplicated hahahaha (remembering that the similar questions are very old, which is not useful at the moment), without the beautiful help of the community I have developed a solution for what I needed :)
javascript php jquery html ajax
marked as duplicate by Nick, jeroen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 '18 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
This question already has an answer here:
window.close and self.close do not close the window in Chrome
12 answers
I would like to know how do I close the current browser window using javascript or any other language that enables this.
I have already seen the window.close () function but it does not work for my case because it only closes what was opened through window.open ().
I thank you for your help.
26/11/2018 - Coming back here to update
Many thanks for the beautiful help I had here and for the beautiful negative feedback in the question and for the markup as duplicated hahahaha (remembering that the similar questions are very old, which is not useful at the moment), without the beautiful help of the community I have developed a solution for what I needed :)
javascript php jquery html ajax
This question already has an answer here:
window.close and self.close do not close the window in Chrome
12 answers
I would like to know how do I close the current browser window using javascript or any other language that enables this.
I have already seen the window.close () function but it does not work for my case because it only closes what was opened through window.open ().
I thank you for your help.
26/11/2018 - Coming back here to update
Many thanks for the beautiful help I had here and for the beautiful negative feedback in the question and for the markup as duplicated hahahaha (remembering that the similar questions are very old, which is not useful at the moment), without the beautiful help of the community I have developed a solution for what I needed :)
This question already has an answer here:
window.close and self.close do not close the window in Chrome
12 answers
javascript php jquery html ajax
javascript php jquery html ajax
edited Nov 26 '18 at 11:22
Alisson Melo
asked Nov 23 '18 at 12:15
Alisson MeloAlisson Melo
13
13
marked as duplicate by Nick, jeroen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 '18 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Nick, jeroen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 23 '18 at 12:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
1 Answer
1
active
oldest
votes
You cannot close a window with javascript that you did not open.
See https://stackoverflow.com/a/19768082/2623781 for more information.
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You cannot close a window with javascript that you did not open.
See https://stackoverflow.com/a/19768082/2623781 for more information.
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
You cannot close a window with javascript that you did not open.
See https://stackoverflow.com/a/19768082/2623781 for more information.
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
You cannot close a window with javascript that you did not open.
See https://stackoverflow.com/a/19768082/2623781 for more information.
You cannot close a window with javascript that you did not open.
See https://stackoverflow.com/a/19768082/2623781 for more information.
answered Nov 23 '18 at 12:20
Monica AchaMonica Acha
428311
428311
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
Yes, I know this, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30
add a comment |
You mean the current tab or the complete browser? (I think/hope this isn't possible via Javascript)
– kerbholz
Nov 23 '18 at 12:19
Yes, I even mention this in the question, I want to know if there is any way to do this, it does not necessarily have to be with javascript, it can be anything, just need the current window to be closed :(
– Alisson Melo
Nov 23 '18 at 12:30