seodevhead
12-26-2005, 11:04 PM
Hey guys, I have a javascript banner rotator on my webpages and it has a <script src=http:...> type tag that is NOT VALIDATING in XHTML at w3c. Any idea how I can remedy this <script src..> to validate? Thanks for your time and help!
Corey Bryant
12-26-2005, 11:20 PM
It must be more within the code? I have been able to include a JS even in strict with no problems.
seodevhead
12-26-2005, 11:33 PM
This is the exact code that is causing validation errors:
<div align="center"><SCRIPT SRC=http://www.mysite.com/banners.pl?action=display></SCRIPT></div>
Line 151, column 32: there is no attribute "SRC"
Line 151, column 38: element "SCRIPT" undefined
etc, etc... all for this <SCRIPT> line.
Corey Bryant
12-27-2005, 12:06 AM
Hm, trying changing to lower case and see what happens
Dan L
12-27-2005, 12:18 AM
Corey had it right.
In XHTML, everything MUST be lower case.
seodevhead
12-27-2005, 02:28 AM
I changed it all to lower case and still getting the same errors on this line. It is the only error on the whole page. For some reason this line just aint validating.
<script src=http://www.mysite.com/banners.pl?action=display></script>
seodevhead
12-27-2005, 02:34 AM
Thanks guys for the advice.... after looking closely I noticed 2 things... plus your insight on the LOWERCASEing of the xhtml.
Needed quotes around src and also needed to declare the script type. Thanks again!
Corey Bryant
12-27-2005, 09:37 AM
Sorry about those quotes. I always use them - but forget about them. Glad you got it all worked out. Good luck with the site!