Can you help me with this Validator error?

Discussion in 'HTML & Website Design' started by chrisj, Apr 29, 2011.

  1. #1
    Can you help me with this Validator error, please. I'm not sure what I'm supposed to replace with what.
    Thanks


    
     Line 120, Column 21: character "<" is the first character of a delimiter but occurred as data 
    			for (var i =0; i < cb.elements.length; i++)✉ 
    This message may appear in several cases: 
    
    •You tried to include the "<" character in your page: you should escape it as "&lt;"
    •You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
    •Another possibility is that you forgot to close quotes in a previous tag.
    Code (markup):
     
    chrisj, Apr 29, 2011 IP
  2. Virtualize

    Virtualize Active Member

    Messages:
    370
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Can you give me the site?
    I know what to do to fix this error. :]
     
    Virtualize, Apr 29, 2011 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's javascript so I think you're missing a <script> tag
     
    Cash Nebula, Apr 29, 2011 IP
  4. dr_zloba

    dr_zloba Well-Known Member

    Messages:
    156
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Copy paste code into any editor which highlight syntax. You will see all tags you typed wrong.
     
    dr_zloba, Apr 29, 2011 IP
  5. xira

    xira Active Member

    Messages:
    315
    Likes Received:
    8
    Best Answers:
    4
    Trophy Points:
    68
    #5
    If you could post the page, it would be more helpful. I also agree that it looks like you didn't close a <script> tag properly... but that is only a guess. Did you solve the problem yet?
     
    xira, Apr 30, 2011 IP
  6. magentoxhtml

    magentoxhtml Well-Known Member

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    126
    #6
    Would you please give us your site url? so that we can understand more clearly about your problem.
     
    magentoxhtml, Apr 30, 2011 IP
  7. hdewantara

    hdewantara Well-Known Member

    Messages:
    540
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #7
    Tic tac toe...
    You are using XHTML and haven't wrapped the script content with CDATA, e.g:
    <script type="text/javascript">//[COLOR="red"]<![CDATA[[/COLOR]
    ...
    [COLOR="red"]//]]>[/COLOR]</script>
    
    Code (markup):
    Ref: http://www.w3schools.com/tags/tag_script.asp
     
    hdewantara, Apr 30, 2011 IP
  8. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #8
    That's true in some cases, but the W3C Validator will skip Javascript without CDATA. It just has to be inside script tags.
     
    Cash Nebula, Apr 30, 2011 IP
  9. om39a

    om39a Peon

    Messages:
    287
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    <script> tag will help for sure !!
     
    om39a, May 1, 2011 IP
  10. Alamgir Rajab

    Alamgir Rajab Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Can you give me the site?
    I know what to do to fix this error. :]
    so that i can understand more clearly about your problem.
     
    Alamgir Rajab, May 5, 2011 IP