SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Beginner needs help...

    Hello all.

    Trying to create a weather website and want to insert two java image loops. I've got one working ok, see below (it's the european satellite loop)

    [URL="http://www.llanelliweather.co.uk/"]

    I want to insert another loop below it. There is currently a low res image loop there for the uk and i want to replace it with a high res image loop. When i insert the code for the second image(uk high res) for some reason, it takes over the european high res image loop above it. Any ideas. see code below for the 2 image loops.

    <p class="autosize" align="center"><font face="Arial"><font color="#0000ff" size="3"><strong><u>European Visible Satellite Movie </u><br>

    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">


    <Style type="text/css">
    <!--
    a:active {text-decoration:none}
    a:visited {text-decoration:none; color:000080}
    a:link {text-decoration:none; color:000080}
    a:hover {text-decoration:underline; color:783822}
    // -->
    </Style>

    <body onload="runSlideShow()" bgcolor=white>


    <center>




    <IMG src='http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis' name='SlideShow' width='900' height='650' border=0>
    <script>
    var slideShowSpeed = 1000
    var crossFadeDuration = 0
    var Pic = new Array()



    Pic[0] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[1] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[2] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[3] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[4] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[5] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[6] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[7] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[8] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'

    Pic[9] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[10] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[11] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[12] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[13] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[14] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[15] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[16] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[17] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[18] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[19] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[20] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[21] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[22] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[23] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[24] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[25] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[26] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'



    Pic[0] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[1] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[2] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[3] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[4] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[5] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[6] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[7] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[8] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'

    Pic[9] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[10] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[11] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[12] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[13] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[14] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[15] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[16] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[17] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[18] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=16&sat=vis'
    Pic[19] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=14&sat=vis'
    Pic[20] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=12&sat=vis'
    Pic[21] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=10&sat=vis'
    Pic[22] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=8&sat=vis'
    Pic[23] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=6&sat=vis'
    Pic[24] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=4&sat=vis'
    Pic[25] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'
    Pic[26] = 'http://www.sat24.com/image.ashx?country=eu&type=slide&time=&index=2&sat=vis'


    var t
    var j = 0
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }

    function runSlideShow(){
    if (document.all){
    document.images.SlideShow.style.filter="blendTrans(duration=2)"
    document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
    document.images.SlideShow.filters.blendTrans.Apply()
    }
    document.images.SlideShow.src = preLoad[j].src
    if (document.all){
    document.images.SlideShow.filters.blendTrans.Play()
    }
    j = j + 1
    if (j > (p-1)) j=0
    t = setTimeout('runSlideShow()', slideShowSpeed)
    }
    </script>

    <!-- <IMG src="http://sat24.com/image.ashx?country=eu&type=loop&sat=vis" width=800 height=600> -->


    <p class="autosize" align="center"><font face="Arial"><font color="#0000ff" size="3"><strong><u>Britain And Ireland Visible Satellite Movie</u><br>

    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">


    <Style type="text/css">
    <!--
    a:active {text-decoration:none}
    a:visited {text-decoration:none; color:000080}
    a:link {text-decoration:none; color:000080}
    a:hover {text-decoration:underline; color:783822}
    // -->
    </Style>

    <body onload="runSlideShow()"





    <center>





    <IMG src='http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=15&sat=vis' name='SlideShow' width='800' height='600' border=0>
    <script>
    var slideShowSpeed = 1000
    var crossFadeDuration = 0
    var Pic = new Array()



    Pic[1] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=14&sat=vis'
    Pic[2] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[3] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[4] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[5] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[6] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[7] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[8] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[11] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[12] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[13] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[14] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[15] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[16] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[17] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[20] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[21] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[22] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[23] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[24] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[25] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[26] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[1] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=14&sat=vis'
    Pic[2] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[3] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[4] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[5] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[6] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[7] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[8] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[11] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[12] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[13] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[14] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[15] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[16] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[17] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[20] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=12&sat=vis'
    Pic[21] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=10&sat=vis'
    Pic[22] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=8&sat=vis'
    Pic[23] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=6&sat=vis'
    Pic[24] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=4&sat=vis'
    Pic[25] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'
    Pic[26] = 'http://www.sat24.com/image.ashx?country=gb&type=slide&time=&index=2&sat=vis'


    var t
    var j = 1
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }

    function runSlideShow(){
    if (document.all){
    document.images.SlideShow.style.filter="blendTrans(duration=2)"
    document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
    document.images.SlideShow.filters.blendTrans.Apply()
    }
    document.images.SlideShow.src = preLoad[j].src
    if (document.all){
    document.images.SlideShow.filters.blendTrans.Play()
    }
    j = j + 1
    if (j > (p-1)) j=0
    t = setTimeout('runSlideShow()', slideShowSpeed)
    }
    </script>

    <!-- <IMG src="http://sat24.com/image.ashx?country=gb&type=loop&sat=vis" width=800 height=600> -->

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    You cannot simply copy-and-paste identical Javascript code in two places on the same page.
    The variables and the function are being redefined. It will always use the last one that was defined.
    There is no 'easy fix' for this. You need a good understanding of Javascript to rewrite the function.
    An alternative would be to rename the second function and ALL the variables used.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Bookmarks

Posting Permissions

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