juanjo.2784
Usuario Novato
Usuario Novato

hola, ya he probado en los navegadores, en local se genera pero en remoto no, el error se presenta en esta parte únicamente, en lo demás que he programado sale a la  perfeccion,  le agreadezco su ayuda.

no se generan las cartas.

<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="Comunidad judía de Bello, Antioquia que desde 2004 ofrece espacios donde se enseña y practica el judaísmo desde los valores, la ética, las relaciones sociales y el cumplimiento de los preceptos consignados en la Torah."/>
<title>CLH-Ejercicios</title>
<link href="/cja.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css " rel="stylesheet">

<link href="/css/style.css" rel="stylesheet">
<link href="http://getbootstrap.com/components/#glyphicons rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Tinos:400,700&subset=hebrew,l atin' rel='stylesheet' type='text/css'>
</head>
<body>
<!--Encabezado-->
<div class="row">
<header class="col-md-12 col-sm-12 col-xs-12">
<!--Menú-->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" runat="server" href="http://cjantioquia.org/es/">
<img src="/imagenes/cja2.png" /></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a class="menu" href="http://cjantioquia.org/es/"><span id="c1" class="glyphicon glyphicon-home active"></span>Home</a></li>
<li><a class="menu" href="index.php"><span id="c2" class="glyphicon glyphicon-pencil"></span>Temas </a></li>
<li><a class="menu" href="index.php#acerca"><span id="c3" class="glyphicon glyphicon-book"></span>Acerca de</a></li>
<li><a class="menu" href="?p=contacto"><span id="c4" class="glyphicon glyphicon-earphone"></span>Contacto</a></li>
</ul>
<ul class="nav navbar-nav navbar-right col-xs-hidden">
<li><a href="https://www.facebook.com/cjoantioquia" target="_blank"><img class="fti" id="c3" alt="Facebook" src="/imagenes/facebook.png"></a></li>
<li><a href="#" target="_blank"><img class="fti" id="c4" alt="Twiter" src="/imagenes/twiter.png"></a></li>
<li><a href="http://instagram.com/cj.antioquia" target="_blank">
<img class="fti" id="c1" alt="Instagram" src="/imagenes/instagram.png"></a></li>
</ul>
</div>
</div>
</div>
<!--fin menú-->
</header>
</div><script>
// Scripted By Adam Khoury in connection with the following video tutorial:
// https://www.youtube.com/watch?v=c_ohDPWmsM0
var memory_array = ['V','ו','Z','ז','T','ט','T','ת','Y','י','L','ל','M','מ','M','ם','S ','ס','S','שׂ','P','פּ','P','ףּ', 'F','פ','F','ף', 'Tz','צ','Tz','ץ','V','ב','Q','ק'];
var memory_values = [];
var memory_tile_ids = [];
var tiles_flipped = 0;
Array.prototype.memory_tile_shuffle = function(){
var i = this.length, j, temp;
while(--i > 0){
j = Math.floor(Math.random() * (i+1));
temp = this[j];
this[j] = this[i];
this[i] = temp;
}
}
function newBoard(){
tiles_flipped = 0;
var output = '';
memory_array.memory_tile_shuffle();
for(var i = 0; i < memory_array.length; i++){
output += '<div class="hbrc" id="tile_'+i+'" onclick="memoryFlipTile(this,''+memory_array[i]+'')"></div>';
}
document.getElementById('memory_board').innerHTML = output;
}
function memoryFlipTile(tile,val){
if(tile.innerHTML == "" && memory_values.length < 2){
tile.style.background = '#FFF';
tile.innerHTML = val;
if(memory_values.length == 0){
memory_values.push(val);
memory_tile_ids.push(tile.id);
} else if(memory_values.length == 1){
memory_values.push(val);
memory_tile_ids.push(tile.id);
if ((memory_values[0] == "V" || memory_values[1]=="V")&&(memory_values[0] == 'ו' || memory_values[1]=='ו'|| memory_values[0] == 'ב' || memory_values[1]=='ב')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//ZAIN
else if ((memory_values[0] == "Z" || memory_values[1]=="Z")&&(memory_values[0] == 'ז' || memory_values[1]=='ז')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//T
else if ((memory_values[0] == "T" || memory_values[1]=="T")&&(memory_values[0] == 'ט' || memory_values[1]=='ט' || memory_values[0] == 'ת' || memory_values[1]=='ת')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//YOD
else if ((memory_values[0] == "Y" || memory_values[1]=="Y")&&(memory_values[0] == 'י' || memory_values[1]=='י')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//LAMED
else if ((memory_values[0] == "L" || memory_values[1]=="L")&&(memory_values[0] == 'ל' || memory_values[1]=='ל')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//M
else if ((memory_values[0] == "M" || memory_values[1]=="M")&&(memory_values[0] == 'מ' || memory_values[1]=='מ' || memory_values[0] == 'ם' || memory_values[1]=='ם')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//S
else if ((memory_values[0] == "S" || memory_values[1]=="S")&&(memory_values[0] == 'ס' || memory_values[1]=='ס' || memory_values[0] == 'שׂ' || memory_values[1]=='שׂ')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//P
else if ((memory_values[0] == "P" || memory_values[1]=="P")&&(memory_values[0] == 'פּ' || memory_values[1]=='פּ' || memory_values[0] =='ףּ' || memory_values[1]=='ףּ')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//F
else if ((memory_values[0] == "F" || memory_values[1]=="F")&&(memory_values[0] =='פ' || memory_values[1]=='פ' || memory_values[0] =='ף' || memory_values[1]=='ף')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//TZADE
else if ((memory_values[0] == 'Tz' || memory_values[1]=='Tz')&&(memory_values[0] == 'צ' || memory_values[1]=='צ' || memory_values[0] =='ץ' || memory_values[1]=='ץ')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}//QOF
else if ((memory_values[0] == "Q" || memory_values[1]=="Q")&&(memory_values[0] == 'ק' || memory_values[1]=='ק')) {
tiles_flipped += 2;
memory_values = [];// Clear both arrays
memory_tile_ids = [];// Clear both arrays
if(tiles_flipped == memory_array.length){// Check to see if the whole board is cleared
alert("Board cleared... generating new board");
document.getElementById('memory_board').innerHTML = "";
newBoard();
}
}
else {
function flip2Back(){
var tile_1 = document.getElementById(memory_tile_ids[0]);
var tile_2 = document.getElementById(memory_tile_ids[1]);
tile_1.style.background = 'url(/imagenes/cja2.png) center center no-repeat #7ACC0A';
tile_1.innerHTML = "";
tile_2.style.background = 'url(/imagenes/cja2.png) center center no-repeat #7ACC0A';
tile_2.innerHTML = "";
memory_values = [];
memory_tile_ids = [];
}
setTimeout(flip2Back, 700);
}
}
}
}
</script>
<div class="tema fondop">
<div class="tcontenido mblanco hidden-xs">
<h1 class="text-center">Alfabeto<small class="hbr"> | אלך-בית</small></h1>
<p>Debes formar pares entre el caracter hebreo y su equivalente en español</p>
</div>
<div class="row col-md-12 col-sm-12 col-xs-12"><!--contedios-->
<div id="memory_board"></div>
<script>newBoard();</script>
</div><!--fin de contedios-->
<div class="row col-md-offset-4 col-md-4 col-md-offset-4"><!--Boton regresar-->
<div class="ejimg ejmarco" id="c3">
<a class="ejlink" href="?p=ejercicios"><span class="ejlink glyphicon glyphicon-paperclip"></span>
<div class="ejthb ejta">תרגיל</div>
<div class="mmesp">Regredar a Ejercicios</div></a>
</div>
</div><!--fin Boton regresar-->
</div> <div class="row">
<div class="col-md-12 col-sm-12 col-xs-12" >
<!--pie-->
<footer class="center">
<div class="row">
<div class="col-md-12">
<h5>Comunidad Judía de Antioquia - Curso de Lectura de Hebreo&copy; 2016</h5>
<hr />
</div>
</div>
<div class="row">
<div class="col-md-1"><img src="/imagenes/cja2.png" /></div>
<div class="col-md-11">
<address>
Calle 27A #50A - 31 Sector Caba&#241a<br />
Bello - Colombia<br />
<abbr title="Phone">Teléfono:</abbr>
(+574) 452 3668
</address>
</div>
</div>
</footer>
</div>
<!--fin de pie-->
</div>
<!--Script-->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://maxcdn.bootstrap.com/bootstrap/3.3.1/js/bootstrap.min.js"></scr ipt>
<!--fin script-->

<!-- Inserted by miarroba -->
</script></noframes></noembed></noscript>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore( a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','mia_ ga');
mia_ga('create', 'UA-597118-7', 'auto');
mia_ga('send', 'pageview');
</script>
<script type="text/javascript" src="http://hosting.miarroba.info/?__muid=2d204caaedf18683a0881eff4824d2cff ff3b9e9&amp;h=1658049&amp;t=1469128878&amp;k=1a6e6e103ed842a4ba97dd98fae5ae a0"></script>
<noscript><img alt="beacon" border="0" width="1" height="1" src="http://hosting.miarroba.info/?__muid=2d204caaedf18683a0881eff4824d2cff ff3b9e9&amp;h=1658049&amp;t=1469128878&amp;k=1a6e6e103ed842a4ba97dd98fae5ae a0&amp;img=1" /></noscript>
<!-- Inserted by miarroba -->
</body>
</html>

Avatar Image
@man / @woman
@man / @woman

http://soporte.miarroba.es/152498/12465189-javascritp-no-fuciona-en-remoto/

Probé este código y no me funciona en local; veo que hay código de distintos orígenes y hacer un seguimiento de todo es tarea de un compilador.

Intentaste aislar y probar el funcionamiento de cada scripts y ver si arroja los resultados esperados ?
(esto se llama prueba de unidad)

ATENCIÓN: Este tema no tiene actividad desde hace más de 6 MESES,
te recomendamos abrir un nuevo tema en lugar de responder al actual
Opciones:
Ir al subforo:
Permisos:
TU NO PUEDES Escribir nuevos temas
TU NO PUEDES Responder a los temas
TU NO PUEDES Editar tus propios mensajes
TU NO PUEDES Borrar tus propios mensajes
Temas similares
No se han encontrado temas similares