[VE][79] Error Message Feedback

Please examine the following piece of code:
I put a long command string into several document.write commands.
The resultant HTML string appears to be correct and working, but the parser interprets it as a series of erros.
Is it a problem of the parser?
How may I overcome this problem?
thank you for your interest to my problem
Carlo Tarozzi


my code:... (this is into the <HEAD>..</HEAD> section ):

<SCRIPT  type="text/javascript">
<!--
function prefe() {
 if (navigator.appVersion.substring(0,1)>='4') {
   document.write("<TABLE bgcolor=silver><TR><TD align=center>");
   document.write("<A HREF='Javascript:window.external.")
 document.write("AddFavorite(location.href,document.title)' class=menu>")
 document.write('<center><FONT size=1 face="arial,sans serif" color=black>')
 document.write('<B>Aggiungi questo sito ai preferiti</B></FONT></center></A>')
  document.write("</TD></TR></TABLE>") 
  }
 }
// --> 
</SCRIPT>

and I call this function from a section of the <BODY>..

here are the errors reported by the parser:
 
a.. Line 24, column 56: end tag for element "B" which is not open

document.write('<B>Aggiungi questo sito ai preferiti</B></FONT></center></A>')

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem. 

If this error occured in a script section of your document, you should probably read this FAQ entry. 

? 

a.. Line 24, column 63: end tag for element "FONT" which is not open

.....write('<B>Aggiungi questo sito ai preferiti</B></FONT></center></A>')

? 

a.. Line 24, column 72: end tag for element "CENTER" which is not open

....i questo sito ai preferiti</B></FONT></center></A>')

? 

a.. Line 24, column 76: end tag for element "A" which is not open

.... sito ai preferiti</B></FONT></center></A>')

? 

a.. Line 25, column 22: end tag for element "TD" which is not open

document.write("</TD></TR></TABLE>") 

? 

a.. Line 25, column 27: end tag for element "TR" which is not open

document.write("</TD></TR></TABLE>") 

? 

a.. Line 25, column 35: end tag for element "TABLE" which is not open

document.write("</TD></TR></TABLE>") 

Received on Sunday, 24 July 2005 12:26:15 UTC