<script type="text/javascript">
function closeWP() {
var Browser = navigator.appName;
var indexB = Browser.indexOf('Explorer');
if (indexB > 0) {
var indexV = navigator.userAgent.indexOf('MSIE') + 5;
var Version = navigator.userAgent.substring(indexV, indexV + 1);
if (Version >= 7) {
window.open('', '_self', '');
window.close();
}
else if (Version == 6) {
window.opener = null;
window.close();
}
else {
window.opener = '';
window.close();
}
}
else {
window.close();
}
}
</script>
oh I found a use for JavaScript!
Try this instead:
<script>
window.onload = function(){ window.close();};
</script>
cluelessPHP wrote:I found a use for JavaScript
So did I:
[1010] Wed 14.Sep.2016 14:37:41
[urmom@server][~/www/pr] wc -l script.js
817 script.js
[1011] Wed 14.Sep.2016 14:37:46
[urmom@server][~/www/pr] grep -c function script.js
43
Still feels like I can do things much faster in PHP though (from a coding standpoint). But just think, now with AJAX I can write MOAR CODE in both languages ... :rolleyes:
dalecosp;11057395 wrote:Still feels like I can do things much faster in PHP though (from a coding standpoint). But just think, now with AJAX I can write MOAR CODE in both languages ... :rolleyes:
My skills in PHP and JavaScript are fairly interchangeable, I'm very proficient at writing syntax errors in both :rolleyes: