vas
03-09-2007, 02:04 AM
1) Script Title: Anu Link drop down menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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>')
Error 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.
In the FAQ entry it says
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.
Is there any way to solve the issue?
actually it showed 41 other errors related to the following
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>'
I removed the </a> and it is working fine.
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.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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>')
Error 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.
In the FAQ entry it says
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.
Is there any way to solve the issue?
actually it showed 41 other errors related to the following
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>'
I removed the </a> and it is working fine.
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.