slideshow fails, Firefox debugger also fails

Discussion in 'Javascript' started by lkrubner@geocities.com, Dec 22, 2004.

  1. Guest

    I'm trying to get a slideshow going on this page:

    http://www.popefamilytravels.com/index.php?pageId=5

    For some reason the debugger in Firefox won't show any errors, but
    there are clearly some errors here. The function doesn't work, even
    once. It was firing once and then quiting till a few moments ago, then
    I did something, I don't know what, and it stopped working all
    together. Here is the code (the lines that start with 'function
    SymError()' are I think something that Firefox writes automatically. I
    did not write that function):



    <div id="imageSlideShow0" class="imageInfoListsImage"
    style="display:none; height:0px; visibility:hidden;"><img
    class="imageInfoImage"
    src="http://www.popefamilytravels.com/mcImages/apo-boat2.jpg">
    </div>
    <div id="imageSlideShow1" class="imageInfoListsImage"
    style="display:none; height:0px; visibility:hidden;"><img
    class="imageInfoImage"
    src="http://www.popefamilytravels.com/mcImages/apo-boat.jpg">
    </div>
    <div id="imageSlideShow2" class="imageInfoListsImage"
    style="display:none; height:0px; visibility:hidden;"><img
    class="imageInfoImage"
    src="http://www.popefamilytravels.com/mcImages/allsaints.jpg">
    </div>
    <div id="imageSlideShow3" class="imageInfoListsImage"
    style="display:none; height:0px; visibility:hidden;"><img
    class="imageInfoImage"
    src="http://www.popefamilytravels.com/mcImages/pftheader_copy.jpg">
    <h3>pft header</h3>
    </div>
    <div id="imageSlideShow4" class="imageInfoListsImage"
    style="display:none; height:0px; visibility:hidden;"><img
    class="imageInfoImage"
    src="http://www.popefamilytravels.com/mcImages/planting-rice2.jpg">
    <h3>Planting Rice 2</h3>
    <p>Closer image of the original</p>
    </div>

    <script language="JavaScript">
    <!--

    function SymError()
    {
    return true;
    }

    window.onerror = SymError;

    var SymRealWinOpen = window.open;

    function SymWinOpen(url, name, attributes)
    {
    return (new Object());
    }

    window.open = SymWinOpen;

    //-->
    </script>

    <script type="text/javascript">

    alert('here we are at the beginning');
    var howManyImages = 5;
    var i = 0;

    function showImageSlideShow() {
    var r = i + 1;
    var currentDivId =
    'imageSlideShow' + i;
    var nextDivId =
    'imageSlideShow' + r;
    alert('the id of the next id is ' +
    nextDivId);

    if
    (document.getElementById(currentDivId)) {
    var currentDiv =
    document.getElementById(currentDivId);
    var nextDiv =
    document.getElementById(nextDivId);


    currentDiv.style.visibility='hidden';

    currentDiv.style.height='0px';

    currentDiv.style.display='none';



    nextDiv.style.visibility='visible';

    nextDiv.style.height='500px;';

    nextDiv.style.display='block';
    alert(nextDiv);
    }
    i++;
    if (i == howManyImages) i =
    0;
    if (i > howManyImages) i =
    0;
    alert ('how many images is
    ' + howManyImages');
    }


    setTimeout("showImageSlideShow()", 5000);
    </script>
     
    , Dec 22, 2004
    #1
    1. Advertising

  2. wrote:

    > setTimeout("showImageSlideShow()", 5000);


    After a quick look at that code I guess that you want
    setInterval("showImageSlideShow()", 5000);
    to repeatedly call the showImagesSlideShow function.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Dec 22, 2004
    #2
    1. Advertising

  3. Grant Wagner Guest

    <> wrote in message
    news:...
    > I'm trying to get a slideshow going on this page:
    >
    > http://www.popefamilytravels.com/index.php?pageId=5
    >
    > For some reason the debugger in Firefox won't show any errors, but
    > there are clearly some errors here. The function doesn't work, even
    > once. It was firing once and then quiting till a few moments ago, then
    > I did something, I don't know what, and it stopped working all
    > together. Here is the code (the lines that start with 'function
    > SymError()' are I think something that Firefox writes automatically. I
    > did not write that function):


    What you most likely did is install something like Norton Internet
    Security (or some other Symantec Internet software). The following code
    points to something injected by a Symantec software product attempting
    to block popups (the "Sym" in all the variable and function names stands
    for "Symantec":

    var SymRealWinOpen = window.open;

    function SymWinOpen(url, name, attributes)
    {
    return (new Object());
    }

    window.open = SymWinOpen;

    --
    Grant Wagner <>
    comp.lang.javascript FAQ - http://jibbering.com/faq
     
    Grant Wagner, Dec 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Herbst
    Replies:
    1
    Views:
    3,285
    David Herbst
    Jan 29, 2006
  2. Ronald Sloot
    Replies:
    0
    Views:
    292
    Ronald Sloot
    Jun 8, 2007
  3. Robert Oschler
    Replies:
    1
    Views:
    246
    Mcginkel
    Sep 5, 2005
  4. Alex
    Replies:
    3
    Views:
    100
    nothingrows
    Jan 23, 2006
  5. aflat362
    Replies:
    7
    Views:
    236
    naixn
    Dec 7, 2006
Loading...

Share This Page