/    Sign up×
Community /Pin to ProfileBookmark

Why this script don’t work?

Why this script don’t work? According to you this script have to change the links to every one minute. And can this script to be changed to change the links to every one day? Can anybody help me? Here is the code:

<!– ONE STEP TO INSTALL LINK OF MINUTE:

  • 1. Add the code into the BODY of your HTML document –>
  • <!– STEP ONE: Copy this code into the HEAD of your HTML document –>

    <BODY>

    <SCRIPT LANGUAGE=”JavaScript”>

    <!– Original: Joe Merical – &#1089;&#1084;&#1103;&#1085;&#1072; &#1085;&#1072; &#1077;&#1076;&#1085;&#1072; &#1084;&#1080;&#1085;&#1091;&#1090;&#1072; –>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

    <!– Begin
    var links = 12; // set this to the number of links you have below!
    var date = new Date();
    var rd = date.getMinutes();
    var ra = rd % links;
    var re = ++ra;
    var url = “document.write(re)”;
    var text = “”;
    if (re == 1) {
    url = “http://javascriptsource.com“;
    text = “The JavaScript Source”;
    }
    if (re == 2) {
    url = “http://www.htmlgoodies.com/“;
    text = “HTMLgoodies”;
    }
    if (re == 3) {
    url = “http://www.ask.com/“;
    text = “Ask.com Search Engine”;
    }
    if (re == 4) {
    url = “http://www.microsoft.com/“;
    text = “Microsoft, Inc.”;
    }
    if (re == 5) {
    url = “http://www.netscape.com/“;
    text = “Netscape’s web site”;
    }
    if (re == 6) {
    url = “http://www.hotbot.com“;
    text = “HotBot’s Search Engine”;
    }
    if (re == 7) {
    url = “http://www.internet.com“;
    text = “Internet.com”;
    }
    if (re == 8) {
    url = “http://www.altavista.digital.com“;
    text = “Digital Altavista – A Search Engine”;
    }
    if (re == 9) {
    url = “http://www.webdiner.com/“;
    text = “Web Diner – Help on the Web”;
    }
    if (re == 10) {
    url = “http://www.smartclicks.com/“;
    text = “SmartClicks – Free advertising on the Web”;
    }
    if (re == 11) {
    url = “http://www.trailerpark.com/flamingo/chowch/aj/“;
    text = “Awards Jungle – One Stop Awards Submission”;
    }
    if (re == 12) {
    url = “http://www.geocities.com/“;
    text = “Geocities – Get a FREE web site”;
    }
    var link=”<A TARGET=”_top” HREF=””+url+”” onMouseOver=”window.status='”+text+”‘”>”+text+”</A>”;
    document.write(link);
    // End –>
    </SCRIPT>

    <p><center>
    <font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
    by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
    </center><p>

    <!– Script Size: 2.00 KB –>

    to post a comment
    JavaScript

    7 Comments(s)

    Copy linkTweet thisAlerts:
    @CharlesOct 13.2006 — That's one yucky script that you have there. Give this one a try:&lt;script type="text/javascript"&gt;

    Date.ONE_SECOND = 1000
    Date.ONE_MINUTE = Date.ONE_SECOND * 60
    Date.ONE_HOUR = Date.ONE_MINUTE * 60
    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()
    myLinks.push ({text: 'HTML 2.0', url: 'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html'})
    myLinks.push ({text: 'HTML 3.2', url: 'http://www.w3.org/TR/REC-html32'})
    myLinks.push ({text: 'HTML 4.01', url: 'http://www.w3.org/TR/html401'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]

    document.write ('&lt;p&gt;&lt;a href="#"&gt;', thisLink.text, '&lt;/a&gt;&lt;/p&gt;')
    document.links[document.links.length-1].href = thisLink.url
    document.links[document.links.length-1].onmouseover = function () {
    window.status = thisLink.text
    return true
    }

    &lt;/script&gt;
    Copy linkTweet thisAlerts:
    @p_rvictorauthorOct 13.2006 — Thank you very much Charles Kagemusha, you are super...

    Can every link in that code to be with a image? How can it be? Can you help me?

    With thanks...
    Copy linkTweet thisAlerts:
    @samanyoluOct 13.2006 — <i>
    </i>&lt;script type="text/javascript"&gt;

    Date.ONE_SECOND = 1000
    Date.ONE_MINUTE = Date.ONE_SECOND * 60
    Date.ONE_HOUR = Date.ONE_MINUTE * 60
    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()
    myLinks.push ({text: 'HTML 2.0' , image: '&lt;img src="agac.bmp" width="50px"height="50px" title="HTML 2.0"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html'})
    myLinks.push ({text: 'HTML 3.2' , image:'&lt;img src="saat.bmp" width="50px"height="50px" title="HTML 3.2"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/REC-html32'})
    myLinks.push ({text: 'HTML 4.01' , image: '&lt;img src="cicek.bmp" width="50px"height="50px" title="HTML 4.01"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/html401'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]

    document.write ('&lt;div&gt;&lt;a href="#"&gt;',thisLink.image, '&lt;/a&gt;&lt;/div&gt;')
    document.links[document.links.length-1].href = thisLink.url
    document.links[document.links.length-1].onmouseover = function () {
    window.status = thisLink.text
    return true
    }

    &lt;/script&gt;
    Copy linkTweet thisAlerts:
    @p_rvictorauthorOct 13.2006 — Thank you samanyolu,

    Indeed you helped me very much.

    Last I have need of still one version:

    To be open all links, but every day only one links to be light indication.
    Copy linkTweet thisAlerts:
    @p_rvictorauthorOct 14.2006 — Hello friend,

    Can you help me?

    How can the under code to work with this format pictures? Thank you..

    <iframe id="external" style="width:98%; height:122px" src="kuba.swf"></iframe>


    <script type="text/javascript">

    Date.ONE_SECOND = 1000

    Date.ONE_MINUTE = Date.ONE_SECOND * 60

    Date.ONE_HOUR = Date.ONE_MINUTE *
    60

    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()

    myLinks.push ({text: 'HTML 2.0' , image: '<img src="pakistan.swf" width="170px"height="119px" title="HTML 1"></img> ', url:

    'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html'})

    myLinks.push ({text: 'HTML 3.2' , image:'<img src="armenia.swf" width="170px"height="119px" title="HTML 2"></img> ', url:

    'http://www.w3.org/TR/REC-html32'})

    myLinks.push ({text: 'HTML 4.01' , image: '<img src="ispania.swf" width="170px"height="119px" title="HTML 3"></img> ', url:

    'http://www.w3.org/TR/html401'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]

    document.write ('<div><a href="#">',thisLink.image, '</a></div>')

    document.links[document.links.length-1].href = thisLink.url

    document.links[document.links.length-1].onmouseover = function () {

    window.status = thisLink.text

    return true

    }

    </script>
    Copy linkTweet thisAlerts:
    @p_rvictorauthorOct 14.2006 — <i>
    </i>&lt;script type="text/javascript"&gt;

    Date.ONE_SECOND = 1000
    Date.ONE_MINUTE = Date.ONE_SECOND * 60
    Date.ONE_HOUR = Date.ONE_MINUTE * 60
    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()
    myLinks.push ({text: 'HTML 2.0' , image: '&lt;img src="agac.bmp" width="50px"height="50px" title="HTML 2.0"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html'})
    myLinks.push ({text: 'HTML 3.2' , image:'&lt;img src="saat.bmp" width="50px"height="50px" title="HTML 3.2"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/REC-html32'})
    myLinks.push ({text: 'HTML 4.01' , image: '&lt;img src="cicek.bmp" width="50px"height="50px" title="HTML 4.01"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/html401'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]

    document.write ('&lt;div&gt;&lt;a href="#"&gt;',thisLink.image, '&lt;/a&gt;&lt;/div&gt;')
    document.links[document.links.length-1].href = thisLink.url
    document.links[document.links.length-1].onmouseover = function () {
    window.status = thisLink.text
    return true
    }

    &lt;/script&gt;
    [/QUOTE]



    Hello samanyolu,

    Thank you for this code, but why it can't show and the text together with the image?

    Can you help me?

    Thank you..
    Copy linkTweet thisAlerts:
    @samanyoluOct 14.2006 —  <br/>
    &lt;body&gt;
    &lt;iframe id="external" style="width:98%; height:122px" src="araba.swf" name="iframe1"&gt;&lt;/iframe&gt;
    &lt;script type="text/javascript"&gt;

    Date.ONE_SECOND = 1000
    Date.ONE_MINUTE = Date.ONE_SECOND * 60
    Date.ONE_HOUR = Date.ONE_MINUTE * 60
    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()
    myLinks.push ({text: 'HTML 2.0' , country:'&lt;embed class="embed" src="a.swf" &gt;&lt;/embed&gt; ', url: 'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html'})
    myLinks.push ({text: 'HTML 3.2' , country:'&lt;embed class="embed" src="b.swf" &gt;&lt;/embed&gt; ', url: 'http://www.w3.org/TR/REC-html32'})
    myLinks.push ({text: 'HTML 4.01', country:'&lt;embed class="embed" src="c.swf" &gt;&lt;/embed&gt; ', url: 'http://www.w3.org/TR/html401'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]
    document.write ("&lt;div&gt;",thisLink.country,"&lt;/div");
    document.write ('&lt;div&gt;&lt;a href="#" target="iframe1"&gt;',thisLink.text, '&lt;/a&gt;&lt;/div&gt;')
    document.links[document.links.length-1].href = thisLink.url
    document.links[document.links.length-1].onmouseover = function () {
    window.status = thisLink.text
    return true
    }

    &lt;/script&gt;


    <br/>
    &lt;script type="text/javascript"&gt;

    Date.ONE_SECOND = 1000
    Date.ONE_MINUTE = Date.ONE_SECOND * 60
    Date.ONE_HOUR = Date.ONE_MINUTE * 60
    Date.ONE_DAY = Date.ONE_HOUR * 24

    myLinks = new Array()
    myLinks.push ({text: 'HTML 2.0' , image: '&lt;img src="agac.bmp" width="50px"height="50px"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/MarkUp/html-spec/html-spec_toc.html', img:'agac.bmp'})
    myLinks.push ({text: 'HTML 3.2' , image:'&lt;img src="saat.bmp" width="50px"height="50px"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/REC-html32', img:'saat.bmp'})
    myLinks.push ({text: 'HTML 4.01' , image: '&lt;img src="cicek.bmp" width="50px"height="50px"&gt;&lt;/img&gt; ', url: 'http://www.w3.org/TR/html401', img:'cicek.bmp'})

    thisLink = myLinks[Math.floor((new Date().getTime() / Date.ONE_DAY) % myLinks.length)]

    document.write ('&lt;div&gt;&lt;a href="#"&gt;',thisLink.image+ thisLink.text, '&lt;/a&gt;&lt;/div&gt;')
    document.links[document.links.length-1].href = thisLink.url
    document.links[document.links.length-1].onmouseover = function () {
    window.status = thisLink.text
    return true
    }

    &lt;/script&gt;
    ×

    Success!

    Help @p_rvictor 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 5.23,
    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: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

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

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...