/    Sign up×
Community /Pin to ProfileBookmark

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’,[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>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@cootheadDec 07.2013 — Hi there alen1978,

[list=1]
  • [*] The number is the string name for the new window.

    [b]Further reading[/b]:-

    [indent]https://developer.mozilla.org/en-US/docs/Web/API/Window.open[/indent]

  • [*] javascript:void is unnecessary.

  • [*]The coding is poor.

    Try it like this...
    [color=navy]
    &lt;!DOCTYPE html&gt;
    &lt;html lang="en"&gt;
    &lt;head&gt;

    &lt;meta charset="utf-8"&gt;

    &lt;title&gt;new windows&lt;/title&gt;

    &lt;script&gt;
    (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&gt;-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);
    })();
    &lt;/script&gt;

    &lt;/head&gt;
    &lt;body&gt;

    &lt;ul id="links"&gt;
    &lt;li&gt;&lt;a href="http://www.link-elearning.com/linkdl/preview/signIn.php?hSajt=78b0fb7d034c46f13890008e6f36806b" data-windowname="1386365686662"&gt;Link na ITA DL Platformu&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.google.com/" data-windowname="google"&gt;google&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;/body&gt;
    &lt;/html&gt;[/color]


    [i]coothead[/i]

  • [/list]
    Copy linkTweet thisAlerts:
    @rootDec 07.2013 — 1386365686662 = Fri, 06 Dec 2013 21:34:46 GMT

    its the number of milliseconds that has passed since 1st Jan 1970
    Copy linkTweet thisAlerts:
    @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?

    Thanx
    ×

    Success!

    Help @alen1978 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...