PDA

View Full Version : Resolved validation of Conveyor Belt slideshow script



wickedd
06-17-2009, 08:50 PM
1) Script Title:
Conveyor Belt slideshow script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm

3) Describe problem:
hello guys I need this great script w3c valid, but its like every html tag is invalid

end tag for element "A" which is not open
end tag for element "NOBR" which is not open
end tag for element "SPAN" which is not open
end tag for element "DIV" which is not open
and so on..

so whats wrong? because every tag looks right for me
for example: leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'

there is <nobr> and </nobr> but validator saying "end tag for element "NOBR" which is not open"

and I cant make the script external like <script src="some.js" type="text/javascript"></script> because Im already using PHP inside that belt slideshow

so any advice?

THANK YOU

jscheuer1
06-18-2009, 04:40 AM
The validator doesn't take it properly into account that it's a script. It sees the opening tags as script code, but the closing tags as HTML code closing tags - go figure.

If you change the closing tags within the script to, for example (escaping their up slashes with down slashes):

<\/a>

instead of:

</a>

It will take care of the 'errors' you mention and the script will still work fine.

Another approach - preferred actually, is to make the script external.

wickedd
06-18-2009, 08:21 AM
OMG its working!! thank you so much you saved my day, sir :)
thanks