Results 1 to 8 of 8

Thread: Ultimate Fade-in slideshow images not appearing

  1. #1
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow images not appearing

    1) Script Title: Ultimate Fade-in slideshow (v1.5)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem:

    I have inserted this script as a linked file on: http://www.eurovisionltd.co.nz/index_3.php but it isn't working. The initial image appears briefly, but then disappears.

    I have linked the javascript file in the head:
    http://www.eurovisionltd.co.nz/common/fadeslideshow.js

    I would very much appreciate assistance with this.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Your call on your page should look like so:

    HTML Code:
    <script type="text/javascript" src="http://www.eurovisionltd.co.nz/common/fadeslideshow.js">
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    </script>
    On to your problem. This linked script:

    HTML Code:
    <script type="text/javascript" src="http://www.eurovisionltd.co.nz/common/xfade2.js"></script>
    has an error in it that stops script processing on the page, remove the above from your page and the slide show will work. The error in xfade2.js is:

    From FF javascript console:
    Error: d.getElementById("imageContainer") has no properties
    Source File: http://www.eurovisionltd.co.nz/common/xfade2.js
    Line: 31
    This means that there is no element with the id of imageContainer on your page and that this line:

    Code:
    imgs = d.getElementById("imageContainer").getElementsByTagName("img");
    is therefore invalid and stops script processing.



    Note: For those who may be wondering about the usage of:

    Code:
    d.getElementById
    d is defined earlier in the script as meaning document.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Oops!

    Hi,

    Sorry about that! I have left it in the linked file!

    Thanks for the answer too. I'll get to and correct all these things.

  4. #4
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Still not working

    I have made the changes (including inserting the authorship notice), but the problem still exists (or some other one)!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This goes in the head:

    HTML Code:
    <script type="text/javascript" src="http://www.eurovisionltd.co.nz/common/fadeslideshow.js">
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    </script>
    This goes in the body:

    HTML Code:
    	 <div id="mastslides">
    	 
        <script type="text/javascript">
        new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
        </script>
        </div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, John. That's done the trick. It's working.

    Just so I understand this, why did it not work using the previous method? I took the que to put the code down in the body from another forum.

    I notice that when javascript is not turned on in the browser, that no image appears at all. Is that what is supposed to happen? If it is, wouldn't it be better to have at least a default image left for the viewer?

    Thanks for your help!

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you have something like so:

    HTML Code:
     <div id="mastslides">
    <script type="text/javascript" src="http://www.eurovisionltd.co.nz/common/fadeslideshow.js">
    /***********************************************
    * Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
    </script>
    </div>
    The functions in the external javascript file are not available to the javascript code on the page which, technically, should never get executed because the contents of the script is the source file of the tag. A comment can go there because comments aren't required for execution.

    Now, a javascript cannot function if javascript is absent or disabled. It is the opinion of some that the best scripts will degrade gracefully in such situations, showing the non-javascript enabled browser alternate content. I disagree with this idea, not in principal but, in practice. The principal is sound but, the javascript developer cannot anticipate all of the particular purposes to which the script will be put. Therefore, just how to 'gracefully degrade' in any given situation is beyond the scope of the developer. It is the designer of the page who should, in my view, take matters into their own hands and include a content specific fall back for non-javascript browsers. In this particular case, a <noscript></noscript> tag should be able to accomplish your stated goal:

    HTML Code:
     <div id="mastslides">
    <noscript><img alt="product image" src="http://www.eurovisionltd.co.nz/revolv_imgs/img1.jpg"></noscript>
        <script type="text/javascript">
        new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
        </script>
        </div>
    Another acceptable alternative would be:

    HTML Code:
     <div id="mastslides">
    <noscript>A Javascript Slide Show would appear here if your browser had javascript enabled and supported it.</noscript>
        <script type="text/javascript">
        new fadeshow(fadeimages, 184, 194, 1, 5000, 1)
        </script>
    
        </div>
    Simply having nothing there at all for the javascript disabled browser isn't too bad either. So, you see from my point of view, it is really up to the designer.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    Thanks for your explanation; it's very helpful. I appreciate your detailed information.

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
  •