Results 1 to 8 of 8

Thread: Ultimate Fade-In slide show Validation Problems

  1. #1
    Join Date
    Jul 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Ultimate Fade-In slide show Validation Problems

    1) Script Title: Ultimate Fade-In slide show

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

    3) Describe problem: I think the fade-in slide show is great and it does exactly what I need, however... when I validate the page in W3C I am getting 27 errors - all within the script for the slide-show.
    What should be my first step?

    My URL is : http://www.mountainpassions.com

  2. #2
    Join Date
    Dec 2006
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <script type="text/javascript" language="JavaScript" src="HideItInHere.js"></script>


    Seriously a first step and fix is to place the code in a separate javascript file and then link to it.

  3. #3
    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

    Quote Originally Posted by Joolsy_M View Post
    1) Script Title: Ultimate Fade-In slide show

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

    3) Describe problem: I think the fade-in slide show is great and it does exactly what I need, however... when I validate the page in W3C I am getting 27 errors - all within the script for the slide-show.
    What should be my first step?

    My URL is : http://www.mountainpassions.com
    First Step: Ignore w3c validation of HTML code if it isn't HTML code.

    Quote Originally Posted by aka Robbie View Post
    <script type="text/javascript" language="JavaScript" src="HideItInHere.js"></script>
    :rolleyes:

    Seriously a first step and fix is to place the code in a separate javascript file and then link to it.
    This is a good idea, but make sure to follow Dynamic Drive's Usage guidelines that require, among other things, that the credit for the script remain on the page(s) that use it. And, skip the language attribute. With this script, used as an external script, you can do that like something like so:

    Code:
    <script type="text/javascript" src="dd_ufade.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>
    Also, making a script external, although it is a rather simple matter, can be a little tricky for a novice. If you decide to go that route and have questions, let us know.
    - John
    ________________________

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

  4. #4
    Join Date
    Jul 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John,

    I have been trying to get the external .js file to work with no success so far.

    I adjusted the code in accordance with your recommendations but still nothing.

    Any suggestions?

  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

    With this script, it is safe to use the small portion (or portions, if using more than one show on a page) of it that go(es) in the body as instructed on the demo page without fear of any complaints from the validator. So, do that part just as before. For the main script (the part that normally would go in the head of your page), make sure that you are following these guidelines when converting it to an external .js file:

    Quote Originally Posted by me often

    Use a text editor to save the script, call it 'file_name.js' where 'file_name' can be any valid file name of your choosing. Substitute the name of your external .js file for some.js in the below:

    HTML Code:
    <script src="some.js" type="text/javascript"></script>
    Common problems arise when:

    1 ) The script file is not in the directory specified. In the above example it must be in the same directory as the page(s) that use it. Below, it can be in the scripts directory off of the root of a domain:

    HTML Code:
    <script src="http://www.somedomain.com/scripts/some.js" type="text/javascript"></script>
    2 ) Opening, closing and/or 'hiding' tags are left in the external file. This means that you must strip:
    Code:
    <script>
    <!--
    and
    Code:
    //-->
    </script>
    and any of their many variations from the beginning and end of the external file.

    3 ) The external call (<script src="some.js" type="text/javascript"></script>) is not inserted into the page at the correct spot. The external call must be inserted at the same place on the page where the script was/would have been.

    4 ) Paths to other files (if) used by the script are no longer valid due to its location. This is only a problem if the external script is kept in a different directory than the page it was working on when it was an internal script. To correct this, use absolute paths inside the script. Absolute path examples:

    Code:
    http://www.somedomain.com/images/button.gif
    
    http://www.somedomain.com/~mysitename/index.html
    5 ) Inappropriately combining two or more scripts into one external file. Usually external scripts can be combined if one knows enough about scripting to do so properly. Even then it is possible to overlook something.

    A rule of thumb when testing is, if it won't work on the page, it won't work as an external file either.

    One other thing, if this is a DD script or any script that requires the credit remain for legal use, include the credit in the on page call, ex:

    HTML Code:
    <script src="some.js" type="text/javascript">
    /***********************************************
    * IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
    * Visit DynamicDrive.com for hundreds of original DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    </script>
    Make sure to retain all the 'decorations', as these include begin and end javascript comment delimiters without which the script won't function.
    If it is still not working out for you, a link to your problem page would be the best way to determine the exact problem(s).
    - John
    ________________________

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

  6. #6
    Join Date
    Jul 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thank you very much John.

    After a little bit of backtracking I recopied the original code and it worked. My code had somehow got another <script></script> in the middle of it which must have been the problem.
    You can see the results at:
    http://www.mountainpassions.com

    Thanks again.

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

    Default

    I have also attempted to place the code in a separate JavaScript file, however I must have done something wrong because the slide show is appearing in the wrong position on the page, and I'm getting some random code showing up where the slide show is meant to be:-

    http://www.jokersfuncasinos.co.uk/dev/

    In the header and I have...

    Code:
    <script src="slideshow.js" type="text/javascript">
    /***********************************************
    * 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>
    And in the body I have...
    Code:
    <script type="text/javascript">
    //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
    new fadeshow(fadeimages, 380, 252, 0, 3000, 0, "R")
    </script>
    Please help!

    Thanks,
    Toby

  8. #8
    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

    Quote Originally Posted by T0bster View Post
    the slide show is appearing in the wrong position on the page, and I'm getting some random code showing up where the slide show is meant to be
    Looks fine to me. You might need to reload your browser and/or clear its cache to get rid of an earlier saved version. If you are still having a problem, which browser are you using?
    - John
    ________________________

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

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
  •