document type does not allow element "a" here.

Joined
Oct 18, 2007
Messages
3
Reaction score
0
<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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top