Results 1 to 8 of 8

Thread: w3c Validation

  1. #1
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default w3c Validation

    Hello Folks (Did you miss me? A question perhaps better left unanswered.)

    My question du jour: Is there a way to escape (or otherwise deal with) the logical and (&&) operator in order to not generate an error message when I do a w3c check on the page?

    Best to all,

    A.
    Last edited by marain; 03-22-2015 at 10:23 PM. Reason: Show resolved.

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Bonjour Marain,
    Tu me manquais énormément.
    Do you mean & or &&? I've never had validation problems with &&.
    Last edited by molendijk; 03-22-2015 at 07:19 PM. Reason: grammar

  3. #3
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    No, I do mean &&. Il ne marche pas!

    A.

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    The validator does not complain about:
    Code:
    <!doctype html>
    <html >
    <head>
    
    <title>Logical And</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <script>
    function bla()
    {
    if(2>1 && 3>2)
    {
    alert('3 bigger than 1')
    }
    }
    </script>
    
    </head>
    
    <body>
    <script>
    bla()
    </script>
    </body>
    
    </html>

  5. #5
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    Perhaps. But try to validate http://www.njdriverslicenses.com/quest.php and see what happens.

    A.

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Try encasing the script in CDATA tags
    Code:
    <script>
    //<![CDATA[
    ... Script here ...
    //]]>
    </script>
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  7. The Following User Says Thank You to Beverleyh For This Useful Post:

    marain (03-22-2015)

  8. #7
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    Wow! It works! Thank you!

    A.

  9. #8
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Quote Originally Posted by Beverleyh View Post
    Try encasing the script in CDATA tags
    Code:
    <script>
    //<=!=[=C=D=A=T=A=[
    ... Script here ...
    //]=]=>
    </script>
    Yes, or make sure your document is not parsed bythe XML parser. This can be done by choosing another doctype.

Similar Threads

  1. Validation IE and FF
    By BILLYFISHING in forum Looking for such a script or service
    Replies: 1
    Last Post: 02-08-2012, 05:13 PM
  2. Validation
    By jeaux in forum PHP
    Replies: 1
    Last Post: 08-26-2008, 08:55 PM
  3. Validation
    By Sliight in forum HTML
    Replies: 6
    Last Post: 07-24-2007, 03:04 PM
  4. Validation --- Please help
    By Humper in forum JavaScript
    Replies: 7
    Last Post: 11-02-2006, 08:34 PM
  5. CSS Validation.
    By Naild in forum CSS
    Replies: 3
    Last Post: 01-21-2006, 04:07 PM

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
  •