Page

Code For Image Slider in ASP.Net

   <script language="JavaScript" type="text/javascript">
<!--
         src = ["images/1.jpg", "images/2.jpg", "images/3.jpg", "images/4.jpg", "images/5.jpg", "images/6.jpg", "images/7.jpg", "images/8.jpg", "images/9.jpg", "images/10.jpg", "images/11.jpg"]

         url = ["    ", "    ", "    ", "     ","    ","    ","    ","    ","   ","   ","   "]
        duration = 4;

        ads = []; ct = 0;
        function switchAd() {
            var n = (ct + 1) % src.length;
            if (ads[n] && (ads[n].complete || ads[n].complete == null)) {
                document["Ad_Image"].src = ads[ct = n].src;
            }
            ads[n = (ct + 1) % src.length] = new Image;
            ads[n].src = src[n];
            setTimeout("switchAd()", duration * 1000);
        }
        function doLink() {
            location.href = url[ct];
        } onload = function () {
            if (document.images)
                switchAd();
        }

</script>


   <div style="position:absolute;  left:1117px; width:218px; height:300px; top:205px;">
    <a href="javascript:doLink();" onMouseOver="status=url[ct];return true;" onMouseOut="status=''">

<img name="Ad_Image" src="pics/1.jpg" border=2% 
     style="border-style: solid; border-color: #000000; height: 300px; top:588px; width: 218px;  margin-top: 6px;" >   &nbsp;</a>

    </div>

No comments:

Post a Comment