PDA

View Full Version : [HTML] Problemino validazione


rxd8s
20-03-2009, 10:22
Salve e mi scuso fin da ora se ho sbagliato sezione :D

Ho questo codicillo:

<div id="twitter_div">
<h2 style="display: none;" >Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/USER.json?callback=twitterCallback2&amp;count=10"></script>

PROBLEMA:

Il validator HTML mi da questo errore:

end tag for "ul" which is not finished. <ul id="twitter_update_list"></ul>

Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

Volevo sapere come risolvere, questo è uno scriptino per richiamare gli ultimi statuses di Twitter ed è l'unico errore che mi da il validator in tutto il sito, alché mi girano un pò le scatole ;)

Vi ringrazio infinitamente da subito...

vizzz
20-03-2009, 10:41
non è sbagliato ma forse rompe perchè è vuoto, prova con:
<ul id="twitter_update_list" />


omettendo </ul>

rxd8s
20-03-2009, 10:56
non è sbagliato ma forse rompe perchè è vuoto, prova con:
<ul id="twitter_update_list" />


omettendo </ul>

Intanto grazie...

La situazione però è peggiorata, ora gli errori di validazione sono 2:

# Line 379, Column 30: end tag for "ul" which is not finished.

<ul id="twitter_update_list" />



Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
# Error Line 379, Column 30: end tag for "ul" which is not finished.

<ul id="twitter_update_list" />



Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

Da notare che lo script funziona perfettamente in entrambi i modi comunque... è solo sta diavolo di validazione :cry:

MadJackal
20-03-2009, 11:13
Prova a scrivere qualcosa tra i due <ul></ul>.
Evidentemente il validatore non accetta <ul> vuoti.. forse. :stordita:

rxd8s
20-03-2009, 12:07
RISOLTOOOOOOOOOOO :yeah:

Praticamente MadJackal aveva ragione: il parametro ul non può esser vuoto.

E' bastato inserire <li style=”display: none;”></li> e mi ha validato il tutto :D

DANKEEE