/    Sign up×
Community /Pin to ProfileBookmark

multiple scripts

hi,

can anyone tell me if it is possible to run multiple copies of the same script on one page. i have a sports results page on my site and i found this neat simple script for blinking text. (see below). i show five games a week and wanted the winning teams score to blink so i added the text. game one great loks good. trouble is when i add it to game 2-5 the text for game one stops blinking and the other 4 are not visable at all. is this because i am trying to run the same thing 5 time? is there a way around this at all. the following link shows the page with only the first game using the script (removed the other 4 for now to demonstate) can i have that scrip for games 2-6 run at the same time?

thanks

the link

[URL=”http://www.thepremiershipclub.com/results2.html”]http://www.thepremiershipclub.com/results2.html[/URL]

the script

<!– TWO STEPS TO INSTALL BLINKING TEXT:

  • 1. Copy the coding into the HEAD of your HTML document

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

    <HEAD>

    <SCRIPT LANGUAGE=”JavaScript”>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>
    <!– Original: Premshree Pillai ([email protected] ) –>
    <!– Web Site: [url]http://www.qiksearch.com[/url] –>
    <!– Begin

    window.onerror = null;
    var bName = navigator.appName;
    var bVer = parseInt(navigator.appVersion);
    var NS4 = (bName == “Netscape” && bVer >= 4);
    var IE4 = (bName == “Microsoft Internet Explorer”
    && bVer >= 4);
    var NS3 = (bName == “Netscape” && bVer < 4);
    var IE3 = (bName == “Microsoft Internet Explorer”
    && bVer < 4);
    var blink_speed=250;
    var i=0;

    if (NS4 || IE4) {
    if (navigator.appName == “Netscape”) {
    layerStyleRef=”layer.”;
    layerRef=”document.layers”;
    styleSwitch=””;
    }else{
    layerStyleRef=”layer.style.”;
    layerRef=”document.all”;
    styleSwitch=”.style”;
    }
    }

    //BLINKING
    function Blink(layerName){
    if (NS4 || IE4) {
    if(i%2==0)
    {
    eval(layerRef+'[“‘+layerName+'”]’+
    styleSwitch+’.visibility=”visible”‘);
    }
    else
    {
    eval(layerRef+'[“‘+layerName+'”]’+
    styleSwitch+’.visibility=”hidden”‘);
    }
    }
    if(i<1)
    {
    i++;
    }
    else
    {
    i–
    }
    setTimeout(“Blink(‘”+layerName+”‘)”,blink_speed);
    }
    // End –>
    </script>

    </HEAD>

    <!– STEP TWO: Copy this code into the BODY of your HTML document –>

    <BODY>

    <div id=”prem_hint” style=”position:relative; left:0; visibility:hidden” class=”prem_hint”>
    <font color=”#000000″><b>93</b></font>
    </div>
    <script language=”javascript”>Blink(‘prem_hint’);</script>

    <p><center>
    <font face=”arial” size”5″><br>
    </a></font>
    </center><p>

    <!– Script Size: 1.98 KB –>

    to post a comment
    JavaScript

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @vwphillipsAug 26.2008 — [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title></title>


    <script language="JavaScript" type="text/javascript">
    /*<![CDATA[*/
    function zxcBlink(zxcobj,zxcss,zxcspd){
    var zxcel=typeof(zxcobj)=='string'?document.getElementById(zxcobj):zxcobj;
    if (!zxcel.blinkoop) zxcel.blinkoop=new zxcBlinkOOP(zxcel);
    var zxcoop=zxcel.blinkoop;
    clearTimeout(zxcoop.to);
    zxcoop.obj.style.visibility=zxcspd?'visible':'hidden';
    zxcoop.spd=zxcspd||zxcoop.spd;
    if (zxcss) zxcoop.blink();
    }

    function zxcBlinkOOP(zxcel){
    this.obj=zxcel;
    this.to=null;
    this.spd=500;
    }

    zxcBlinkOOP.prototype.blink=function(){
    this.obj.style.visibility=this.obj.style.visibility=='visible'?'hidden':'visible';
    this.to=setTimeout(function(zxcoop){return function(){zxcoop.blink();}}(this),this.spd);
    }
    // End -->

    /*]]>*/
    </script></head>

    <body onload="zxcBlink('prem_hint',true,100);zxcBlink('prem_hint1',true,100);">
    <input type="button" name="" value="Stop" onclick="zxcBlink('prem_hint');"/>
    <input type="button" name="" value="Start" onclick="zxcBlink('prem_hint',true,1000);"/>
    <div id="prem_hint" style="position:relative; left:0; visibility:hidden" class="prem_hint">
    <font color="#000000"><b>93</b></font>
    </div>
    <div id="prem_hint1" style="position:relative; left:0; visibility:hidden" class="prem_hint">
    <font color="#000000"><b>943</b></font>
    </div>

    </body>

    </html>[/CODE]
    ×

    Success!

    Help @zugfrig78 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.28,
    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,
    )...