Results 1 to 6 of 6

Thread: Ultimate Fade-in slideshow (v1.5) : some htmlerrors and warnings

  1. #1
    Join Date
    Nov 2004
    Location
    Switzerland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v1.5) : some htmlerrors and warnings

    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 implements this very nice script on my website and it works perfectly . However, my FF extension HTMLTidy gives me about ~30 errors and warning on the js code for example :

    * line 478 column 400 - Error: character "'" is not allowed in the value of attribute "ID"
    * line 482 column 15 - Warning: cannot generate system identifier for general entity "dom"
    * line 482 column 15 - Error: general entity "dom" not defined and no default entity
    * line 482 column 18 - Error: reference to entity "dom" for which no system identifier could be generated
    * line 493 column 25 - Warning: cannot generate system identifier for general entity "obj.tempobj.filters"
    * line 493 column 25 - Error: general entity "obj.tempobj.filters" not defined and no default entity
    * line 509 column 62 - Error: element "OBJ.POSTIMAGES.LENGTH-1" undefined
    * ...

    I'm using doctype html 4.01 transitional loose.dtd.

    Anyone has the same errors ?

  2. #2
    Join Date
    Nov 2004
    Location
    Switzerland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You know what ? I've added the js code between the <head> tags of my page and all errors are gone. There seems to be a difference if the slideshow code is defined in the html header or in the body.

    Anyone knows why ?

  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

    The vagaries of the error checker. Opinions vary but, mine is that since the code is javascript, the error checker shouldn't parse it as HTML anyway, no matter where it is placed in the page, as long as it is within a valid <script> tag. Ideally, all scripts should be external. Either way though, the real important part is that your scripts are valid, correct, well written script code and are inserted using valid tags.
    Last edited by jscheuer1; 04-04-2007 at 04:08 AM. Reason: Spelling
    - John
    ________________________

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

  4. #4
    Join Date
    Nov 2004
    Location
    Switzerland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I could not find any valid errors as detected by the parser. It thinks it is html

    Well, I have put all the script code in an external javascript file called "slideshow.js" and called it in the html header like :

    Code:
    <script type="text/javascript" src="includes/javascript/slideshow.js"></script>
    ..poef..all parsing errors & warnings gone...life can be cool sometimes

    Thanks for the comment..

    Didier.

  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

    To be in compliance with DD's usage terms, you must include the script credit on the page, ex:

    Code:
    <script type="text/javascript" src="includes/javascript/slideshow.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>
    - John
    ________________________

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

  6. #6
    Join Date
    Nov 2004
    Location
    Switzerland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the remark. I've added the credits inside the external javascript but not in the calling page. I will add it also there !

    I have to read those DD's terms someday

    Didier.

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
  •