Results 1 to 7 of 7

Thread: Scroller is causing lots-o-errors when i validate

  1. #1
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Scroller is causing lots-o-errors when i validate

    1) Script Title: Pausing up-down Scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

    3) Describe problem: i've got the script to work but when i try to validate the page - i have boat load of errors and they are almost all dealing with the scroller!
    Lots of XML Parsing Errors, general entity X not defined and no default entity, etc, etc.

    Has anyone experienced this? did i set it up wrong?
    My Doctype is XHTML 1.0 Transitional.
    Here's my page : http://www.marshall-legacy.org/index-new!.html

    here's the page on WSC3 with the error codes : http://validator.w3.org/check?uri=ht...idator%2F1.591

    Any help would be greatly appreciated...
    thanks,
    Lisa

  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

    Make the script external.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    mateoweb (09-30-2008)

  4. #3
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default made it external but it doesn't load

    i made it an external js file but it's not loading. am i doing it wrong??? i made a new page to test : http://www.marshall-legacy.org/windex.html

    and here's the js file: http://www.marshall-legacy.org/scripts/pscroller2.js

    thanks for the suggestion BTW. I'd love it if this external could work. thanks in advance for any help!!!
    -lisa

  5. #4
    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

    Get rid of (highlighted):

    Code:
    pausecontent2[2]='<a href="http://www.marshall-legacy.org/!our_dogs/dog-adopt.html">Click here for Info on how to Adopt Your OWN Mine Detection Dog</a>'
    pausecontent2[3]='<a href="http://www.marshall-legacy.org/!news_and_events/donor_delegation_trip.html"> Donor Delegation Trip: Highlights here...</a>'
    
    
    </script>
    
    <script type="text/javascript">
    
    /***********************************************
    * Pausing up-down scroller- copyright Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay inta . . .
    from the external script file.

    There could be other problems, but that looks like all, and must be taken out.

    Added Later:

    There is another problem, this (on your page):

    Code:
      <div id="index_left_main"><div id="pscroller2">
      <script language="javascript" type="text/javascript" src="../scripts/pscroller2.js">
    
    //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    
    
    document.write("<br />")
    new pausescroller(pausecontent2, "pscroller2", "someclass", 3000)
    </script></div>
    should be:

    Code:
      <div id="index_left_main"><br />
      <script type="text/javascript">
    
    //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    new pausescroller(pausecontent2, "pscroller2", "someclass", 3000);
    </script>
    Last edited by jscheuer1; 09-30-2008 at 08:47 PM. Reason: add info
    - John
    ________________________

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

  6. #5
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    hi John - i REALLY appreciate your help! i did what you said, made the changes to the js file and then i made the changes to the page. the scroller is now in the page but if you take a look: http://www.marshall-legacy.org/windex.html
    it has broken out of the container. i played around a bit, cleared the div. still it is funky. Oh - i also removed the </br> from the code you gsve me and that took away the float error. any suggestions????
    thanks again,
    -lisa

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

    Though it just isn't right, it must be compensating for some other problem (perhaps even one I introduced by editing it incorrectly), so you can go back to what you had in the body before we made any changes:

    Code:
      <div id="index_left_main"><div id="pscroller2">
      <script type="text/javascript">
    
    //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    
    
    document.write("<br />")
    new pausescroller(pausecontent2, "pscroller2", "someclass", 3000)
    </script></div>
    In correcting an obvious error with it I may, as I say caused another less obvious one with more serious layout consequences, or the layout was flawed and the error corrected that, I can't tell right now which it is.

    The obvious error is having the hard coded:

    Code:
    <div id="index_left_main"><div id="pscroller2">
    because the script makes one too, and only one element per page per id is allowed.

    But as I say, if taking it out messes things up, keep it and all the rest you had that was working there.

    However, only for validation purposes, and only if there is still an error in validation, some changes may need to be made to it. Or perhaps it could be made into a small separate external script.

    For example, this (though fine if it works out):

    Code:
    document.write("<br />")
    may be causing validation problems. It could either be removed, or changed to:

    Code:
    document.write("<br \/>")
    Last edited by jscheuer1; 10-01-2008 at 03:24 PM. Reason: add clarity
    - John
    ________________________

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

  8. #7
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    hey john - i can't believe it but i got the darn thing to work. i went back to what it was before and then added the code that made the page all funky and took out the </br> so the new code looks like:
    Code:
    <div id="maincontent">
        <div id="index_left_main"><div id="pscroller2">
      <script type="text/javascript">
    
    //new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
    new pausescroller(pausecontent2, "pscroller2", "someclass", 3000);
    </script></div>
    also, i stripped out the clear divs. in any event the page works and looks as i wanted it to and now the only errors i have to deal with are the ones attributed to the flash movie!! 7 errors away from a clean page. thanks soooo much for helping me, i couldn't have done this without you.
    -lisa

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
  •