SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript not working in IE (anyone please help me)

    I am trying to create a Image slideshow(gallary) in javascript which works fine in all other browsers like opera, firefox, google chrome but it not works in any version of IE


    //This code is saved in .js file

    var slideimages=new Array()
    function slideshowimages(){
    for (i=0;i<slideshowimages.arguments.length;i++){
    slideimages[i]=new Image()
    slideimages[i].src=slideshowimages.arguments[i]
    }
    }
    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed=4000

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


    // This code is saved in .html file

    <img src="images/qdimages/eth.jpg" name="slide" border=0 width="242px" height="190px">
    <script>
    slideshowimages("images/qdimages/eth1.jpg","images/qdimages/eth2.jpg","images/qdimages/jonica1.jpg","images/qdimages/jonica3.jpg","images/qdimages/jonica4.jpg","images/qdimages/jonica5.jpg")
    slideit();
    </script>

    Please anyone help where i am doing wrong.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,509
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Welcome to the SP forums
    Quote Originally Posted by guy42 View Post
    it not works in any version of IE
    What does 'not work' mean? Do you get any errors?

  3. #3
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it not works in any version of IE, It only display a cross sign in the place of Image. but it works fine in all other browser like opera, google chrome and firefox.

  4. #4
    SitePoint Zealot
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are the image names or extensions in uppercase?

  5. #5
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no it is not in uppercase. I assign the source of img though dreamweaver so it automatically picks the name and path of image. then i copy the src and paste it in function parameter.


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
  •