Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Random order image link

    Is it possible to add code to this script that will change it to sequential or give a choice between random or not. I love the script but need the sequestial. Script can be found here.

    http://suffieldchamber.com/featuredbusiness2.htm or below

    <!--

    /*
    Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
    Over 200+ free JavaScripts here!
    Updated: 00/04/25
    */

    function random_imglink(){
    var myimages=new Array()
    //specify random images below. You can have as many as you wish
    myimages[1]="pictures/suffield-chamber-highland-p.jpg"
    myimages[2]="pictures/suffield-chamber-webster-ba.jpg"
    myimages[3]="pictures/Ameriprise - Rietberg.JPG"
    myimages[4]="pictures/Asnuntuck.jpg"
    myimages[5]="pictures/BudgetBlinds.jpg"
    myimages[6]="pictures/championgarmentandgift.jpg"
    myimages[7]="pictures/FEB.jpg"
    myimages[8]="pictures/LaganaandCompany.jpg"
    myimages[9]="Pictures/Harp-Mechanical.jpg"
    myimages[10]="Pictures/Edward-Keyes.jpg"
    myimages[11]="pictures/HeritageFuneralHomeSign.jpg"
    myimages[12]="Pictures/Friends-of-the-Farm-at-Hill.jpg"
    myimages[13]="Pictures/Mitechlogo.JPG"
    myimages[14]="Pictures/Russo-Lawn-&-Landscape.jpg"
    myimages[15]="Pictures/Spencer-On-Main-B&B.jpg"
    myimages[16]="Pictures/Stone-Insurance-Sign.jpg"
    myimages[17]="Pictures/suffield-country-club.jpg"
    myimages[18]="Pictures/Suffield-Village-Dental-Sta.jpg"
    myimages[19]="Pictures/Suffield-Village-Wine-and-S.jpg"
    myimages[20]="Pictures/Superior-Decor.jpg"
    myimages[21]="Pictures/The-Lily-House.jpg"
    myimages[22]="Pictures/trend-2000.jpg"
    myimages[23]="Pictures/victoriaspellamn&associates.jpg"
    myimages[24]="Pictures/fnb.jpg"
    myimages[25]="Pictures/JoePlourde.jpg"
    myimages[26]="Pictures/springstreet.jpg"
    myimages[27]="Pictures/SEDCweb.jpg"
    myimages[28]="Pictures/rockvillebank.jpg"
    myimages[29]="Pictures/FirstChoiceFinancial.jpg"
    myimages[30]="Pictures/AXAadvisors.jpg"
    myimages[31]="Pictures/visual-logic.jpg"


    //specify corresponding links below
    var imagelinks=new Array()
    imagelinks[1]="http://www.highlandparkmarket.com/suffield.html"
    imagelinks[2]="http://www.websterbank.com/servlets/com.websterbank.servlets.Content?city=Suffield&branch=12&session_id=&action=branch-info"
    imagelinks[3]="http://www.ameripriseadvisors.com/kathleen.d.rietberg/"
    imagelinks[4]="http://www.acc.commnet.edu"
    imagelinks[5]="http://www.budgetblinds.com"
    imagelinks[6]="http://www.championgarment.com"
    imagelinks[7]="mailto:febllc@aol.com"
    imagelinks[8]="http://laganaandcompanycpa.com.com"
    imagelinks[9]="http://www.harpmech.com"
    imagelinks[10]="http://www.fa.ml.com/BBK"
    imagelinks[11]="http://www.suffieldfuneralhome.com"
    imagelinks[12]="http://fofah.com"
    imagelinks[13]="http://mitechllc.com"
    imagelinks[14]="http://russolawn.com"
    imagelinks[15]="http://spenceronmain.com"
    imagelinks[16]="http://stoneinsurancellc.com"
    imagelinks[17]="http://suffieldcc.com"
    imagelinks[18]="mailto:gcmtdds@yahoo.com"
    imagelinks[19]="http://suffieldchamber.com/membershipdirectory06.htm#Suffield_Village_Wine_&_Spirits"
    imagelinks[20]="http://superiordecor.com"
    imagelinks[21]="http://thelilyhouse.com"
    imagelinks[22]="http://trend2000.com"
    imagelinks[23]="http://victoriaspellman.com"
    imagelinks[24]="http://www.fnbanksuffield.com"
    imagelinks[25]="http://www.plourderealty.com"
    imagelinks[26]="http://springstreetservicecenter.com"
    imagelinks[27]="http://www.suffieldedc.com"
    imagelinks[28]="mailto:mjohnson@rockvillebank.com"
    imagelinks[29]="mailto:donald-naples@sbcglobal.net"
    imagelinks[30]="http://www.arniemagid.com"
    imagelinks[31]="http://www.visuallogicinc.com"

    var random_display = 0; // 0 = no, 1 = yes

    var ry=Math.floor(Math.random()*myimages.length)
    if (ry==0)
    ry=1
    document.write('<a href='+'"'+imagelinks[ry]+'"'+' target="featuredbusinessopen"><img src="'+myimages[ry]+'" border=0></a>')}
    random_imglink()
    //-->
    </script>

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what do you mean sequential.

    each time the page loads you want the 'next' image?

    i'm afraid that can only be done using a server side lang (or complicated js + cookies / js + url variables)
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<


  •  

    Posting Permissions

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