1) Script Title: Anu Link drop down menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm
3) Describe problem: I try to validate the html in which the script embedded. here is what i get for the following section of the code.
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
In the FAQ entry it saysError Line 236 column 184: end tag for element "DIV" which is not open.
...onMouseout="dynamichide(event)"></div>')
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.
Is there any way to solve the issue?The validator complains about something in my JavaScript!
Most probably, you should read the script section of WDG's excellent Common HTML Validation Problems document.
Why doesn't the validator like my <link ... /> or <meta ... />?
HTML is based on SGML and uses an SGML feature (called SHORTTAG) (note that this is not the case with XHTML).
With this feature enabled, the "/" in <link ... /> or <meta ... /> already closes the link (or meta) tag, and the ">" becomes some regular text, which is not allowed in the <head> element. Since </head><body> is optional in HTML (again, not in XHTML), it is silently inserted, thus head-only elements like meta and style as well as "</head>" and "<body>", which may appear only once, become false.
actually it showed 41 other errors related to the following
I removed the </a> and it is working fine.menu3[14]='<a href="mailto:starf1@mail.com" class="mainmenu"><img src="images/favicons/contact.png" border="0" height=16 width=16 alt="Contact"> Contact</a>'
But when I removed the </div> it validated with 0 errors but send a blank web page with only drp down timer visible in the opera browser.
could you please tell me a way out to validate the script.
Thanks in advance.



Reply With Quote



Bookmarks