document type does not allow element "a" here.

Discussion in 'HTML and CSS' started by vijayakumarb82, Oct 18, 2007.

  1. vijayakumarb82

    vijayakumarb82

    Joined:
    Oct 18, 2007
    Messages:
    3
    <script language="javascript" type="text/javascript">
    function dynamicdisplay()
    {
    document.getElementById('footertexts').innerHTML = "<a href='http:\/\/www.pearnkandola-clients.co.uk\/CiscoMobileQuestionnaire.asp' class='tabconlink' target='_blank'>CLICK HERE TO FIND OUT HOW SUITED YOU ARE TO BE AN EFFECTIVE MOBILE WORKER</a>";
    setTimeout("dynamicdisplaywithhref()",4000);
    }
    function dynamicdisplaywithhref()
    {
    document.getElementById('footertexts').innerHTML = "<a href='http:\/\/www.watsonwyatt.com\/europe\/ireland\/news\/HR_Excellence_Awards_2007\/' class='tabconlink' target='_blank'>PEARN KANDOLA IS SPONSORING THE CIPD IRELAND HR EXCELLENCE AWARDS 2007. CLICK HERE FOR MORE INFO.</a>";
    setTimeout("dynamicdisplay()",4000);
    }
    </script>

    When I using the above script in html.

    I have two error when I checking XHTML validation, the following the errors

    1. Line 204, Column 166: document type does not allow element "a" here.
    …p' class='tabconlink' target='_blank'>CLICK HERE TO FIND OUT HOW SUITED YOU A
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


    2. Line 209, Column 177: document type does not allow element "a" here.
    …/' class='tabconlink' target='_blank'>PEARN KANDOLA IS SPONSORING THE CIPD IR
    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

    Please help me to solve the above problem
     
    vijayakumarb82, Oct 18, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff
    Replies:
    2
    Views:
    987
    clintonG
    Sep 19, 2006
  2. bbxrider
    Replies:
    9
    Views:
    8,464
    vijayakumarb82
    Oct 18, 2007
  3. showandbeshown@gmail.com

    document type does not allow element "input" here

    showandbeshown@gmail.com, Dec 9, 2007, in forum: HTML
    Replies:
    18
    Views:
    24,910
    tallnhairy
    Sep 28, 2011
  4. Ryan Taylor
    Replies:
    1
    Views:
    718
    Ryan Taylor
    Sep 9, 2004
  5. FAQ server
    Replies:
    0
    Views:
    165
    FAQ server
    Aug 10, 2006
Loading...

Share This Page