Monday, May 20, 2024
89
rated 0 times [  93] [ 4]  / answers: 1 / hits: 20731  / 12 Years ago, wed, may 16, 2012, 12:00:00

It works in Chrome and I thought it used to work in IE8... but it doesn't seem to.



javascript:window.open('', '_self', ''); window.close();alert('test');


All I get is the alert.



Basically i'm trying to execute a function which works fine in the browser as an a link, but using the same code in captivates execute javascript on a button, doesn't work.



Then I thought I would test it using javascript: in IE... and it doesn't close it ether.



Whats going on?

It's driving me nuts.


More From » internet-explorer

 Answers
17

I found that this works



top.close();


From within the browser address bar



javascript:top.close();

[#85553] Monday, May 14, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zariahdiamondz

Total Points: 649
Total Questions: 109
Total Answers: 88

Location: Tajikistan
Member since Thu, Apr 14, 2022
2 Years ago
;