PDA

View Full Version : Dreamweaver CS5.5 and HTML LInt tool


jfhopper
09-26-2011, 05:09 PM
Good Morning:
I'm experiencing an issue with http://lint.brhten.com. when I run a web page developed in Dreamweaver CS5.5 I receive the following error:

Cannot continue!
HTML is not valid (Line 30: Illegal closing tag </head> for <d.forms.length;i++)>)


If I comment out the JavaScript I do not receive the error error. When I develop the page in an earlier version of Dreamweaver I do not receive the same error.


Any ideas of the problem? Thanks for your help.

johnMoss
09-26-2011, 11:38 PM
Your hyperlink isn't working... can't see page...

jfhopper
09-27-2011, 01:31 PM
I never provided the URI of the page, rather that was the URI of the Lint tool. So the URI is unimportant. What is critical is the error in a JavaScript created by Dreamweaver CS5.5 that is causing the Lint tool to blow up.

The Lint tool says that a line of JavaScript is not valid HTML, which I agree with. So my question is why is this error only occurring with a page built in Dreamweaver cs 5.5? Here is the original post again to help clarify the issue.......

The error below is from the HTML Lint tool:

Cannot continue!
HTML is not valid (Line 30: Illegal closing tag </head> for <d.forms.length;i++)>)


If I comment out the JavaScript I do not receive the error error. When I develop the page in an earlier version of Dreamweaver I do not receive the same error.

johnMoss
09-27-2011, 01:50 PM
Without seeing your code, I can't see the big picture, but the tag your lint analyzer is showing per your post is not closed , & that's it's beef. What is the earlier version doing differently, closing it, right? I have CS4, and it wouldn't surprise me if ther are bugs in the CS5 series with html 5, which I assume you are trying to use? Guessing here...

jfhopper
09-27-2011, 02:02 PM
Seeing the code has absolutely no value to you. You cannot fix code that is not broken.

The HTML Lint tool is showing JavaScript, generated by Dreamweaver CS 5.5, as HTML and saying the HTML is not closed. Since JavaScript IS NOT HTML, hence the beginning of the question. The only time this error is reported by the HTML Lint tool is when a page generated by Dreamweaver CS 5.5 is tested.

I'm looking to see if anyone else has experienced the same issue.

The JavaScript is correct, it is generated by Dreamweaver CS 5.5. The HTML is correct, when generated by an older version of Dreamweaver the HTML Lint tool likes it. When I comment out the JavaScript, which is not HTML, the HTML Lint tool likes the page.

So I am down to is Dreamweaver CS 5.5 and the HTML Lint tool having an issue. If they are what is the solution?

johnMoss
09-27-2011, 02:29 PM
Seeing the code has absolutely no value to you. You cannot fix code that is not broken.

Not looking for broken code, looking for differences, declared html format, etc...

The HTML Lint tool is showing JavaScript, generated by Dreamweaver CS 5.5, as HTML and saying the HTML is not closed.

No it is not, reread your error, it is saying the closing html head tag is invalid because lint assumes you have an unclosed script tag and is parsing the closing head tag as such.

The JavaScript is correct, it is generated by Dreamweaver CS 5.5. The HTML is correct, when generated by an older version of Dreamweaver the HTML Lint tool likes it. When I comment out the JavaScript, which is not HTML, the HTML Lint tool likes the page.

So what is different about the code down to that closing head tag, if anything?

So I am down to is Dreamweaver CS 5.5 and the HTML Lint tool having an issue. If they are what is the solution?

Does the page work? This is why I'm curious about html5 in this case. The lint people are pointing out it's a deBug work in progress; I've run into a bunch so far myself with 5....

jfhopper
09-27-2011, 03:10 PM
The HTML Lint tool is identifying <d.forms.length;i++)>) as HTML so it thinks the closing head tag is invalid. Javascript is legally and offically closed. Page works just does not play will with HTML Lint too

Since you insist on code:
Code generated by Dreamweaver cs 5.5

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>The Legend of the Founding of Overland Park Kansas</title> <link href="../ophistory.css (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/ophistory.css)" rel="stylesheet" type="text/css" /> <script src="../SpryAssets/SpryMenuBar.js (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/SpryAssets/SpryMenuBar.js)" type="text/javascript"></script> <script type="text/javascript"> function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } </script> <link href="../SpryAssets/SpryMenuBarVertical.css (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/SpryAssets/SpryMenuBarVertical.css)" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('../images/home_f2.png','../images/history_f2.png','../images/industry_f2.png','../images/culture_f2.png','../images/people_f2.png','../images/realestate_f2.png','../images/schools_f2.png')"> <div id="outerwrapper"> <div id="header"><img src="../images/banner.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/banner.png)" alt="History of Overland Park" width="955" height="75" id="logo" /></div> <div id="navBar"><a href="../index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/index.html)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','../images/home_f2.png',1)"><img src="../images/home.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/home.png)" alt="Home" width="100" height="25" border="0" id="home" /></a><a href="ophistory.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('history','','../images/history_f2.png',1)"><img src="../images/history.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/history.png)" alt="History" width="100" height="25" border="0" id="history" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('industry','','../images/industry_f2.png',1)"><img src="../images/industry.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/industry.png)" alt="Industry" width="100" height="25" border="0" id="industry" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('culture','','../images/culture_f2.png',1)"><img src="../images/culture.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/culture.png)" alt="Culture" width="100" height="25" border="0" id="culture" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('people','','../images/people_f2.png',1)"><img src="../images/people.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/people.png)" alt="People" width="100" height="25" border="0" id="people" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('real estate','','../images/realestate_f2.png',1)"><img src="../images/realestate.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/realestate.png)" alt="Real Estate" width="100" height="25" border="0" id="real estate" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('schools','','../images/schools_f2.png',1)"><img src="../images/schools.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/schools.png)" alt="Schools" width="100" height="25" border="0" id="schools" /></a><img src="../images/search.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/search.png)" alt="Search the site" width="255" height="25" id="search" /></div> <div id="content"> <div id="leftNav"> <ul id="historyNav" class="MenuBarVertical"> <li><a href="blacksmithshop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/blacksmithshop.html)">Blacksmith Shop</a> </li> <li><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)">Overland Park Ranch Home</a></li> <li><a href="downtownop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/downtownop.html)">Downtown Overland Park</a> </li> <li><a href="betsy_lenexa.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/betsy_lenexa.html)">Besty Lenexa</a></li> <li><a href="opchildren.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/opchildren.html)">Overland Park Children </a></li> <li><a href="strangline.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/strangline.html)">Strang Line</a></li> </ul> </div> <div id="rightContent"> < </div> </div id="footer"> <p align="center"><a href="../index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/index.html)">Home </a>| <a href="ophistory.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html)">History</a> |<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Industry</a><a href="blacksmithshop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/blacksmithshop.html)"> </a>|<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Culture</a> |<a href="strangline.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/strangline.html)"> People </a>|<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Real Estate</a> |<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Schools</a><br /> Copyright&copy;2011By<a href="mailto:ehopper1@stumail.jccc.edu (ehopper1@stumail.jccc.edu)">ErinHopper</a><br /> </p> <p align="center">&nbsp; </p> <p align="center"><br /> </p> </div> <script type="text/javascript"> var MenuBar1 = new Spry.Widget.MenuBar("historyNav", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); </script> </body> </html> Code generated by Dremaweaver CS4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>The Legend of the Founding of Overland Park Kansas</title> <link href="../ophistory.css (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/ophistory.css)" rel="stylesheet" type="text/css" /> <script src="../SpryAssets/SpryMenuBar.js (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/SpryAssets/SpryMenuBar.js)" type="text/javascript"></script> <script type="text/javascript"> function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } </script> <link href="../SpryAssets/SpryMenuBarVertical.css (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/SpryAssets/SpryMenuBarVertical.css)" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('../images/home_f2.png','../images/history_f2.png','../images/industry_f2.png','../images/culture_f2.png','../images/people_f2.png','../images/realestate_f2.png','../images/schools_f2.png')"> <div id="outerwrapper"> <div id="header"><img src="../images/banner.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/banner.png)" alt="History of Overland Park" width="955" height="75" id="logo" /></div> <div id="navBar"><a href="../index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/index.html)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','../images/home_f2.png',1)"><img src="../images/home.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/home.png)" alt="Home" width="100" height="25" border="0" id="home" /></a><a href="ophistory.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('history','','../images/history_f2.png',1)"><img src="../images/history.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/history.png)" alt="History" width="100" height="25" border="0" id="history" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('industry','','../images/industry_f2.png',1)"><img src="../images/industry.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/industry.png)" alt="Industry" width="100" height="25" border="0" id="industry" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('culture','','../images/culture_f2.png',1)"><img src="../images/culture.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/culture.png)" alt="Culture" width="100" height="25" border="0" id="culture" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('people','','../images/people_f2.png',1)"><img src="../images/people.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/people.png)" alt="People" width="100" height="25" border="0" id="people" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('real estate','','../images/realestate_f2.png',1)"><img src="../images/realestate.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/realestate.png)" alt="Real Estate" width="100" height="25" border="0" id="real estate" /></a><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('schools','','../images/schools_f2.png',1)"><img src="../images/schools.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/schools.png)" alt="Schools" width="100" height="25" border="0" id="schools" /></a><img src="../images/search.png (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/images/search.png)" alt="Search the site" width="255" height="25" id="search" /></div> <div id="content"> <div id="leftNav"> <ul id="historyNav" class="MenuBarVertical"> <li><a href="blacksmithshop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/blacksmithshop.html)">Blacksmith Shop</a> </li> <li><a href="# (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html#)">Overland Park Ranch Home</a></li> <li><a href="downtownop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/downtownop.html)">Downtown Overland Park</a> </li> <li><a href="betsy_lenexa.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/betsy_lenexa.html)">Besty Lenexa</a></li> <li><a href="opchildren.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/opchildren.html)">Overland Park Children </a></li> <li><a href="strangline.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/strangline.html)">Strang Line</a></li> </ul> </div> <div id="rightContent"> < </div> </div id="footer"> <p align="center"><a href="../index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/index.html)">Home </a>| <a href="ophistory.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/ophistory.html)">History</a> |<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Industry</a><a href="blacksmithshop.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/blacksmithshop.html)"> </a>|<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Culture</a> |<a href="strangline.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/strangline.html)"> People </a>|<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Real Estate</a> |<a href="index.html (http://www.dreamweaverclub.com/forum/view-source:http://students.jccc.edu/ehopper1/overlandpark/htdocs/index.html)"> Schools</a><br /> Copyright&copy;2011By<a href="mailto:ehopper1@stumail.jccc.edu (ehopper1@stumail.jccc.edu)">ErinHopper</a><br /> </p> <p align="center">&nbsp; </p> <p align="center"><br /> </p> </div> <script type="text/javascript"> var MenuBar1 = new Spry.Widget.MenuBar("historyNav", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); </script> </body> </html>

johnMoss
09-27-2011, 03:48 PM
The script tag is opened prior to your commenting it out. You can see that by noticing it is in color in the DW editor. Your closing tag is within the commented elements, hence unseen. That is your problem. What I don't understand is that the same problem exists in CS4 and yet you say it works. It errored on me in CS 4...

johnMoss
09-27-2011, 03:50 PM
oops... lemme rephrase... not closing tags but closing script brackets "{" Lint sees, "}" it doesn't....