some javascript code has HTML code in a string and comment & won't validate as HTML 4

Discussion in 'HTML & Website Design' started by winterheat, Sep 7, 2008.

  1. #1
    I was written an AJAX example on http://www.0011.com/ajax_example and the javascript has the portion like

    node.innerHTML = "<pre>" + s + "</pre>"

    and a comment of

    return false; // don't follow the original link <a href="..." ></a>

    for some reason, the code won't validate as HTML 4.01... I thought XHTML 1.0 is the one that needs hiding of the Javascript code? HTML 4.01 doesn't need to hide it I thought...? Thanks very much!
     
    winterheat, Sep 7, 2008 IP