www.webdeveloper.com
+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 31 to 34 of 34
  1. #31
    Join Date
    Nov 2010
    Posts
    6
    Hmm I must be doing something wrong... table coming up with blank background:


    <script type="text/javascript">
    var pictureArchive=

    ['images/rotator/1.jpg','images/rotator/2.jpg','images/rotator/3.jpg','images/rotator/4.jpg'];

    window.onload=function() {
    rotate(pictureArchive.length);
    }

    function rotate(idx) {
    if(idx>=pictureArchive.length) {
    idx=0;
    }
    document.getElementByID('mbusu')[0].style.backgroundImage = 'url

    ('+pictureArchive[idx++]+')';
    timerID=setTimeout(function(){rotate(idx)}, 5000);
    }</script>


    <table id="mbusu" border="0" height="311" width="873"

    cellspacing="0" cellpadding="0" >

    <tr><td>etc etc



    Sorry for being a pain in the butt Fang!

  2. #32
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    document.getElementById('mbusu').style.backgroundImage = 'url('+pictureArchive[idx++]+')';
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #33
    Join Date
    Nov 2010
    Posts
    6
    Cool! It finally works. Can't thank you enough! Prepare to be assimilated and stuff...! Make it so Number One! and erm... don't wear a red shirt!

  4. #34
    Join Date
    Nov 2012
    Posts
    1

    centering the images

    That code worked great for looping the images, how does one center the images on the page vertically speaking?

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

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
HTML5 Development Center



Recent Articles