These are links for popup window. I understand all of it except for the numbers just after the link? Also is javascript:void necessary before window.open? Thank you.
<a href=”http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b” onclick=”javascript:void window.open(‘http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b’,[B]‘1386365686662‘[/B],’width=700,height=500,toolbar=1,menubar=1,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0′);return false;”>Link na ITA DL Platformu</a> <br><br> <a href=”http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b” onclick=”javascript:void window.open(‘http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b’,[B]‘1386366098181‘[/B],’width=700,height=500,toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=1,left=0,top=0′);return false;”>Link na ITA DL Platformu</a>
Try it like this... [color=navy] <!DOCTYPE html> <html lang="en"> <head>
<meta charset="utf-8">
<title>new windows</title>
<script> (function() { 'use strict'; var newwindow; var features='width=700,height=500,toolbar=1,menubar=1,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0';
function init(){ var el=document.getElementById('links').getElementsByTagName('a'); var c=el.length; while(--c>-1) { el[c].onclick=function(){ if(newwindow) { newwindow.close(); } newwindow=window.open(this.href,this.getAttribute('data-windowname'),features); newwindow.focus(); return false; } } } window.addEventListener? window.addEventListener('load',init,false): window.attachEvent('onload',init); })(); </script>
</head> <body>
<ul id="links"> <li><a href="http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b" data-windowname="1386365686662">Link na ITA DL Platformu</a></li> <li><a href="http://www.google.com/" data-windowname="google">google</a></li> </ul>
@alen1978authorDec 07.2013 — #Thank you for explanation. Your version seams very complicated for such a simple task? Plus I don't get onload popup window? I only get "google" popup once I click on it? Is this how it's meant to be or an error?