Javascript codice per facebook

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?
 

criric

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
21 Ago 2010
5.607
54
48
TN
Ciao,
hai gia provato a cambiare il doctype della pagina? probabilmente risolvi
 
Discussioni simili
Autore Titolo Forum Risposte Data
F Svantaggi del codice Javascript per disabiltare la selezione del testo? Javascript 1
U CODICE per una pagina con contenuti dinamici usando javascript Javascript 4
M codice JAVASCRIPT per avere box HTML con data-ora Ajax 0
K Aiutooo!!urgente Codice Javascript Per Esame Javascript 0
A [Javascript] errore Js in esecuzione codice da animate Javascript 2
V Passaggio codice html a javascript Javascript 8
G [Javascript] come si testa il codice java-sciipt Javascript 2
L [Javascript] Come inserire codice dopo un div in automatico Javascript 2
M [Javascript] "Stampare" nel codice Var JS Javascript 5
franco69 [Javascript] dubbi metodi di inserimento codice inline Javascript 2
B [Javascript] Decompilare codice var Javascript 7
S [Javascript] Codice JS inline non funzione su IE Javascript 1
romeocharly errore del codice html con javascript durante ottimizzazione websitex5 Javascript 7
A problema : codice javascript Javascript 1
M Far partire una funzione/codice php con javascript Javascript 1
Marco_88 Codice php in Javascript Javascript 11
L Inserire codice php dentro al javascript PHP 4
F Codice Random Javascript con slideshow Javascript 3
M Codice php inviato tramite javascript viene commentato Javascript 2
F conversione codice javascript in jquery Javascript 1
lsnight Implementare javascript mouseover con codice php Javascript 2
F funzione javascript all'interno di un codice php PHP 38
A eseguire codice html da funzione javascript Javascript 2
C Problema insolito, codice javascript ignorato Javascript 3
C Tenere traccia IP visitatori con codice javascript Javascript 1
M Nascondere o Offuscare codice Javascript e Jquey jQuery 2
J Inserire codice javascript in html Javascript 3
Monital query php in codice javascript Javascript 7
B Trasformare/convertire codice javascript in link URL Javascript 11
T problema con codice html dentro javascript Javascript 1
@ Immagine via codice javascript Javascript 0
F Aiuto! Codice Javascript non funzionante correttamente Javascript 0
N Eseguire codice javascript HTML e CSS 1
A Come inserisco codice ASP dentro un Javascript? Classic ASP 1
S codice C su JavaScript......vi prego aiuto, rischio licenziamento Javascript 0
A Domanda codice javascript Javascript 3
L Aiuto Codice Javascript Javascript 0
I Creare un banner temporaneo JavaScript Javascript 0
S Impossibile scorrere un oggetto in JavaScript Javascript 0
N Passare array da php a javascript PHP 5
L Quiz javascript funzionante da migliorare Javascript 0
P errore 404 con javascript Javascript 2
D aiuto funzioni javascript Javascript 1
M Upload immagine con javascript problemi con FormData() Javascript 1
L countdown multiplo javascript Javascript 1
S Problemi Javascript + Aruba Javascript 2
M Inviare un file su un server remoto con JavaScript Javascript 0
T a href="javascript:;" Javascript 1
F Creare elementi html con javascript Javascript 3
A pulsante di update campo mysql con javascript Javascript 2

Discussioni simili