dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Meaning of '1386365686662' numbers in this url?

  1. #1
    Join Date
    Nov 2013
    Posts
    17

    Meaning of '1386365686662' numbers in this url?

    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','1386365686662','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','1386366098181','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>

  2. #2
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,496
    Hi there alen1978,

    1. The number is the string name for the new window.
      Further reading:-
    2. javascript:void is unnecessary.
    3. The coding is poor.
      Try it like this...
      Code:
      
      <!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>
      
      </body>
      </html>
      coothead

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,591
    1386365686662 = Fri, 06 Dec 2013 21:34:46 GMT

    its the number of milliseconds that has passed since 1st Jan 1970
    If your post falls off the page, bump it. ...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Nov 2013
    Posts
    17
    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?
    Thanx

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles