Skip navigation
CutieRomano
Currently Being Moderated

When using CS5.5 dreamweaver "rollover image" tool it is not complying with W3C validation. Why?

Mar 21, 2012 11:16 AM

When using CS5.5 dreamweaver "rollover image" tool it is not complying with W3C validation. Why?  It is erroring out all over the place?

 

Any help please that would be great!!!

 

Thanks,

 

TIffany

 
Replies
  • Currently Being Moderated
    Mar 21, 2012 11:25 AM   in reply to CutieRomano

    Please post a link to your website so we can see the code and the output from the W3C Validator.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 21, 2012 12:17 PM   in reply to CutieRomano

    Have you used a DocType in your page?

     

    Just a thought

     

    Martin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 21, 2012 12:32 PM   in reply to CutieRomano

    I'm guessing here because I don't have access to your entire code.

     

    X/HTML docs (transitional) treat JavaScript as CDATA (character data).  W3C Validator ignores character data.

     

    XHTML strict treats JavaScript as PCDATA (parsed character data).  W3C Validator chokes on this and flags it as invalid code.

     

    To avoid errors in XHTML Strict, add CDATA tags around your JavaScript code.  Or, simply change doc type to XHTML transitional.

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

    http://twitter.com/altweb

    http://alt-web.blogspot.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2012 5:04 AM   in reply to Nancy O.

    Hello Nancy,

     

    I have the same problem on my website (no validation for the image rollovers made in DW). Example page: http://www.opsicilie.nl/NL/home2.html

     

    Validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.opsicilie.nl%2FNL%2 Fhome2.html&charset=%28detect+automatically%29&doctype=Inline&group=0& user-agent=W3C_Validator%2F1.3

     

    I've tried using the CDATA tags I found on W3 but I couldn't use them without getting syntax errors in DW. Your other solution was "Or, simply change doc type to XHTML transitional." It looks like it's already XHTML transitional:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

     

    Could you tell me what I should change on the page the pass the validation? 

     

    Thank you in advance for your time!

     

    Martin

     

    PS bonus question: is this the correct way of inserting the language tag (language is Dutch) on this page?:

    <html xmlns="http://www.w3.org/1999/xhtml" lang="nl" xml:lang="nl">

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2013 3:31 PM   in reply to rigte056

    Try this...

    Add this... <!--    //-->  to your code after the script type, and before end script.

     

    <script type="text/javascript">

    <!--

    The rollover code here

    //-->

    </script>

     

    Bill

    http://www.4imagedesign.com/

     

    Let me know if this worked for you.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2013 3:41 PM   in reply to John Waller

    Try this...

    Add this... <!--    //-->  to your code after the script type, and before end script.

     

    <script type="text/javascript">

    <!--

    The rollover code here

    //-->

    </script>

     

    Bill

    http://www.4imagedesign.com/

     

    Let me know if this worked for you.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points