Comunidad de diseño web y desarrollo en internet online

Error de validación LinkedIn

Citar            
MensajeEscrito el 10 Dic 2012 09:48 am
Cuanddo intento validar en HTML5 me da error;

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: mykey
authorize: true
</script>

<script type="text/javascript">
function onLinkedInAuth() {
IN.API.Profile("me")
.result( function(me) {
var id = me.values[0].id;
// AJAX call to pass back id to your server
});
}
</script>

El error: "The text content of element script was not in the required format: Expected space, tab, newline, or slash but found a instead."

Lo he intentado usando CDATA de la siguiente manera:

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
//<![CDATA[
api_key: mykey
authorize: true
//]]>
</script>

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
/* <![CDATA[ */
api_key: mykey
authorize: true
/* ]]> */
</script>

Pero continúa dándome el mismo error de validación y en la consola me sale esto: "script tag contents must be key/value pairs separated by a colon. Source: TypeError: Cannot read property '1' of null"

Ya no se qué probar, alguna opción?

Gracias.

Por demssite

5 de clabLevel



Genero:Masculino  

chrome
Citar            
MensajeEscrito el 10 Dic 2012 12:17 pm
Ni estás valídando nada en HTML5 ni es error de validación de nada. Simplemente tienes un error de sintaxis. Esto:

api_key: mykey
authorize: true

En JavaScript no tiene sentido y como parece que has hecho un copy&paste de algún lado seguramente te has olvidado de copiar algo.

Por DriverOp

Claber

2510 de clabLevel



 

opera
Citar            
MensajeEscrito el 10 Dic 2012 01:15 pm

Por demssite

5 de clabLevel



Genero:Masculino  

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.