Javascript codice per facebook

  • Creatore Discussione Creatore Discussione Kirsolo
  • Data di inizio Data di inizio

Kirsolo

Utente Attivo
17 Gen 2013
171
0
0
Salve,
nel mio sito ho inserito il codice javascript della condivisione e mi piace di facebook.

Il problema è che validando il codice tramite W3C mi da questi 5 errori:

there is no attribute X ✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 129, column 44: there is no attribute "data-href"
… <div class="fb-like" data-href="http://www.hotelagrifoglio.com/" data-s…
Line 129, column 88: there is no attribute "data-send"
…//www.hotelagrifoglio.com/" data-send="true" data-layout="button_count" data-w…
Line 129, column 107: there is no attribute "data-layout"
…io.com/" data-send="true" data-layout="button_count" data-width="450" data-sho…
Line 129, column 133: there is no attribute "data-width"
…true" data-layout="button_count" data-width="450" data-show-faces="true"></div>
Line 129, column 155: there is no attribute "data-show-faces"
…true" data-layout="button_count" data-width="450" data-show-faces="true"></div>

mentre x il codice in questione che ho immesso è il seguente:

Codice:
<script type="text/javascript"> 
		  (function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				    if (d.getElementById(id)) {return;}
					  js = d.createElement(s); js.id = id;
					    js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
						  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<div class="fb-like" data-href="MIOSITOWEB" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div>

Qualcuna sa come si risolvono questi errori?
 
Ciao,
hai gia provato a cambiare il doctype della pagina? probabilmente risolvi
 

Discussioni simili