You must Sign In to post a response.
  • Category: JavaScript

    I am doing image slide show slide show is working but i want birthday imagesto slide

    I have written image slide show code in javascript its working but I have some birthday images with that images "what I want is exactly when the images are sliding the birthday image related to aparticular date should also slide with these images"suppose today is april 8 so the image related to this day shold also slide
    below is javascriptcode


    <table border='00' cellpadding='0' cellspacing='0' width=0 height=0 align="left">
    <tr>
    <td align="center" colspan='2' valign="top">
    <script type="text/javascript">
    var slideimages=new Array()
    var slidelinks=new Array()

    var currentTime = new Date()
    var day = currentTime.getDay()
    var date = currentTime.getDate()
    var emonth = emonth.getimage
    function slideshowimages(){
    for (i=1,j=0;i<slideshowimages.arguments.length;i++){
    if(i<=10|| i-9==date )
    {
    slideimages[j]=new Image()
    slideimages[j].src=slideshowimages.arguments[i-1]
    j++
    }
    }
    }

    //-->
    </script>
    <a href="javascript:gotoshow()"><img src="ektha1.jpg" name="slide" border=0 width=152% height=550></a>
    <script>
    <!--

    //configure the paths of the images, plus corresponding target links
    slideshowimages("ektha1.jpg","ektha2.jpg","ektha3.jpg","ektha4.jpg","ektha5.jpg","ektha6.jpg","ektha7.jpg","ektha8.jpg","ektha9.jpg","MARCH5.JPG","MARCH2.JPG","01.JPEG","02.JPEG","03.JPEG","04.JPEG","05.JPEG","06.JPEG","07.JPEG","08.JPG","09.JPEG","10.JPEG","11.JPEG","12.JPEG","13.JPEG","14.JPEG","15.JPEG","16.JPEG","17.JPEG","18.JPEG","19.JPEG","20.JPEG","21.JPEG","22.JPEG","23.JPEG","24.JPEG","25.JPEG","26.JPEG","27.JPEG","28.JPEG","29.JPEG","30.JPEG","31.JPEG")
    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed=1500

    var whichlink=0
    var whichimage=0
    function slideit(){
    if (!document.images)
    return
    document.images.slide.src=slideimages[whichimage].src
    whichlink=whichimage
    if (whichimage<slideimages.length-1)
    {
    whichimage++
    }
    else
    whichimage=0
    setTimeout("slideit()",slideshowspeed)
    }
    slideit()
    //-->
    </script>

    <td valign="top" hspace=10 vspace=10&>
    <script language="javascript" type="text/javascript">
    var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
    var thetime = new Date();
    var themonth = thetime.getMonth();
    var theday = thetime.getUTCDate();
    var m='<img src="' + months[themonth] + ''+theday+'.jpg">';
    document.write(m);
    document.write(theday);

    if(m.exists)
    document.write('<img src="' + months[themonth] + ''+theday+'.jpg" alt="Image of the month: ' + months[themonth] + ' " width="155" height="100" />');

    (function(){

    var allimgs = document.images;

    for(var i=0; i<allimgs.length; i++){

    allimgs[i].onerror = function () {

    this.style.visibility = "hidden"; // other elements not affected

    }

    }

    })();


    document.write('<html><body>');
    document.write('<br/>');
    //document.write('<img src="bday6.jpg" width="270" height="300" />');
    </script>

    so images are slidingbut birthday image not sliding
  • #757743
    Do you mean that all the image files are sliding except the birthday image files?
    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #757748
    yes

  • #757754
    There are multiple JQuery plugin are available for slide show you can use one of them.

    Here is one of a good one.



    jssor.com/download.html

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM


  • Sign In to post your comments