Hello and welcome to our community! Is this your first visit?
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
    Jun 2010
    Thanked 0 Times in 0 Posts

    Javascript not working properly in Safari & Chrome

    I have an "animated slideshow" of 29 jpeg images on a page created using Javascript. It works fine in Internet Explorer and Firefox but not Safari or Chrome. The jpeg files names are 01.jpg through to 29.jpg. Here below is the code in the header and the body. There is an error in there somewhere:

    <title>My webpage</title>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
    <SCRIPT language="JavaScript" type="text/JavaScript">
    var speed=1333;
    var counter = 1;
    function rollPics() {
    document.display.src=counter+".jpg"; //Display image "counter".jpg
    counter ++; // Add 1 to counter
    if (counter>29) { // If counter is greater than 29 images then reset it
    <!-- END -->

    <IMG NAME="display" SRC="1.jpg" onLoad="setTimeout('rollPics()',1333)">
    Last edited by vr100; 06-18-2010 at 05:34 PM. Reason: not complete anough

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,563 Times in 2,541 Posts
    See:- http://www.codingforums.com/showthread.php?t=17515.
    You will not get any reply in this forum which is intended to be used only to
    post a completed (working) script for showcasing/benefit of others.

    You should also study the forum posting guidelines, especially about double posting and the use of [code] tags.


    Posting Permissions

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