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 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Slide Show Problems

    Hi,

    I'd like to insert a image slide show in the home page of my website, so learned hoe to do it from the Tutorial.

    I wrote as it is said, selecting my own GIF images, but it doesn't work.

    Can you please tell me what do I do wrong?


    Code:
    "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" >
    <head>
    <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
    <title>Mavi/homepage</title>
    <style type="text/css">
    
    body {
    background: black;
    position: center;
    font-family: verdana;
    font size: 10pt;
    padding-top: 25px;
    }
    
    #header {
    background-color: #87cefa;
    margin: 0px 140px 0px 140px;
    height: 80px;
    border: solid 1px black;
    }
    
    #main {
    background-image: url(images/tre 2.jpg);
    background-position: 50% 50%;
    background-color: white;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-size: 105%
    padding: 0px;
    margin: 0px 140px 0px 140px;
    border: solid 1px black;
    }
    
    #footer {
    background-color: #87cefa;
    color: #800000;
    text align: center;
    padding: 5px;
    margin: 0px 140px 0px 140px;
    font-size: 51%;
    border: solid 1px black;
    }
    
    a:link {
    color: white;
    border-bottom: white;
    }
    
    a:visited {
    color: white;
    border-bottom: white;
    }
    
    
    </style>
    
    <script type="text/javascript">
    <!--
    var image1=new Image()
    image1.src="image1.gif"
    var image2=new Image()
    image2.src="image2.gif"
    var image3=new Image()
    image3.src="image3.gif"
    var image4=new Image()
    image4.src="image4.gif"
    //-->
    </script>
    
    
    </head>
    
    <body bgcolor="#494949">
    
    <div id="header" style="width: 796; height: 70">
    <dl>
    <dd>
    <br/>
    <br/>
    <p align="center"><b><font color="#FFFFFF"><font size="5" face="Verdana">Mavi</font></b></p>
    </dd>
    </dl>
    </div>
    
    
    <div id="main" style="width: 793; height: 1210">
    <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
    <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;</p>
    
    
    <img src="apavisa 3.gif" name="slide" width=100 height=56>
    
    <script>
    <!--
    //variable that will increment through the images
    var step=1
    function slideit(){
    //if browser does not support the image object, exit.
    if (!document.images 2)
    return
    document.images 2.slide.src=eval("image"+step+".src")
    if (step<3)
    step++
    else
    step=1
    //call function "slideit()" every 3 seconds
    setTimeout("slideit()",2500)
    }
    slideit()
    //-->
    </script>
    
    </div>
    
    
    <div id="footer" style="width: 795; height: 39">
    </div>
    </body>
    </html>"


    Thanks!!!!!
    Mavi

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    You have a few problems in that code, take a look at this one

    http://www.huntingground.freeserve.c...dshow1auto.htm

    there's a few more examples in the Image Scripts section as well
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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