Foros del Web » Programando para Internet » Javascript »

[SOLUCIONADO] Scripts incompatibles

Estas en el tema de Scripts incompatibles en el foro de Javascript en Foros del Web. Hola! Tengo un mismo PHP con dos scripts: uno es sobre un dialog de jquery y otro es el script table-hover. Aquí dejo los códigos. ...
  #1 (permalink)  
Antiguo 16/02/2016, 10:25
 
Fecha de Ingreso: diciembre-2014
Ubicación: Madrid
Mensajes: 274
Antigüedad: 9 años, 4 meses
Puntos: 5
Scripts incompatibles

Hola!

Tengo un mismo PHP con dos scripts: uno es sobre un dialog de jquery y otro es el script table-hover. Aquí dejo los códigos. El problema que tengo es que no funciona el button que abre el dialog.

Gracias!!

Código PHP:
Ver original
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" href="../../../Estilos/Estilos.css">
  6. </head>
  7. <body>
  8. <?php
  9. // Incluyo cabecera y conexión a la base de datos
  10. require ("../../../SiempreAdjunto.php");
  11. include ("../../Cabecera/CabeceraRol".$_SESSION['RolUsuario'].".php");
  12. // Traigo el nombre de la materia que estoy calificando
  13. $Query1 = "SELECT * FROM `Asignaturas` WHERE `ID` = '".$_GET['Curso']."'";
  14. $MyQuery1 = $MyConnect->query($Query1);
  15. $MyFetch1 = $MyQuery1->fetch_assoc();
  16. // Nombre para la microcabecera
  17. $Tit1 = "Calificaciones de ".utf8_encode($MyFetch1['Materia']);
  18. switch ($_GET['Ev']){
  19.     case 1:
  20.         $EvN = "Primera Evaluación";
  21.     break;
  22.     case 2:
  23.         $EvN = "Segunda Evaluación";
  24.     break;
  25.     case 3:
  26.         $EvN = "Tercera Evaluación";
  27.     break;
  28. }
  29. $Tit2 = utf8_encode($MyFetch1['Materia'].' - '.$MyFetch1['Curso'].' - ').$EvN;
  30. ?>
  31. <script src="../../../Estilos/JQuery/jquery-ui.js"></script>
  32. <script>
  33. $(function() {
  34.     $( "#DialogoItems" ).dialog({
  35.         autoOpen: true,
  36.         width: '80%',
  37.         height: 600,
  38.         modal: true,
  39.         show: {
  40.             effect: "drop",
  41.             duration: 500
  42.         },
  43.         hide: {
  44.             effect: "drop",
  45.             duration: 500
  46.         },
  47.     });
  48.     $( "#BotonDialogoItms" ).click(function() {
  49.         $( "#DialogoItems" ).dialog( "open" );
  50.     });
  51. });
  52. </script>
  53. <script>
  54. $(function() {
  55.     $('#Tabla').tableHover({rowClass: 'hoverrow', colClass: 'hover', clickClass: 'click' });
  56. });
  57. </script>
  58. <script src="../../../Librerias/jquery.tablehover.js"></script>
  59. <div id="DialogoItems" title="Gestión de ítems">
  60.     <iframe src="../Items/Inicio.php?Curso=<?= $_GET['Curso']; ?>&Ev=<?= $_GET['Ev']; ?>" frameborder="0" width="100%" height="100%" scrolling="yes"></iframe>
  61. </div>
  62. <title><?= $Tit1; ?></title>
  63. <div class="MicroCabecera">
  64.     <div class="Izq">j</div>
  65.     <div class="Dch">
  66.         <div class="Titulo1"><?= $Tit1; ?></div>
  67.         <div class="Titulo2"><?= $Tit2; ?></div>
  68.     </div>
  69. </div>
  70. <fieldset class="FieldsetNormal">
  71.     <legend>Opciones</legend>
  72.     <button id="BotonDialogoItems" class="Boton1">Gestión de ítems</button>
  73. </fieldset>
  74. <form action="Guardar.php" method="post">
  75.     <div class="Calificaciones">
  76.         <table id="Tabla">
  77.             <tr>
  78.                 <td colspan="2" class="HeadCuaderno">Alumno</td>
  79.             <?php
  80.             $Tabla = "PROF".$_SESSION['ID']."-ASIG".$_GET['Curso']."-EV".$_GET['Ev'];
  81.             $Query2 = "SELECT * FROM `".$Tabla."-Items`";
  82.             $MyQuery2 = $MyConnect->query($Query2);
  83.             while ($MyFetch2 = $MyQuery2->fetch_assoc()){
  84.                 echo '<input type="text" name="Items[]" value="'.utf8_encode($MyFetch2['Reducido']).'" class="InputOculto"><td class="HeadCuaderno" title="'.utf8_encode($MyFetch2['NombreItem']).'">'.$MyFetch2['Reducido'].'</td>';
  85.             }
  86.             $Query3 = "SELECT * FROM `Matriculaciones` WHERE `Curso` = '".$_GET['Curso']."'";
  87.             $MyQuery3 = $MyConnect->query($Query3);
  88.             while ($MyFetch3 = $MyQuery3->fetch_assoc()){
  89.                 $Query4 = "SELECT * FROM `Usuarios` WHERE `ID` = ".$MyFetch3['Alumno']."";
  90.                 $MyQuery4 = $MyConnect->query($Query4);
  91.                 $MyFetch4 = $MyQuery4->fetch_assoc();
  92.                 echo '
  93.                <tr>
  94.                    <td class="NumeroLista">'.$MyFetch3['NumeroLista'].'</td>
  95.                    <td class="CuerpoNormal">'.utf8_encode($MyFetch4['NombreA1'].' '.$MyFetch4['NombreA2'].', '.$MyFetch4['NombreN']).'</td>
  96.                ';
  97.                 $Query5 = "SELECT * FROM `".$Tabla."-Cuaderno` WHERE `NumeroLista` = '".$MyFetch3['NumeroLista']."'";
  98.                 $MyQuery5 = $MyConnect->query($Query5);
  99.                 while ($MyFetch5 = $MyQuery5->fetch_array(MYSQLI_NUM)){
  100.                     for ($i = 2; $i < count($MyFetch5); $i++){
  101.                         echo '<td class="Calificacion"><input type="text" value="'.$MyFetch5[$i].'" class="CampoNotas" name="'.$MyFetch5[0].'[]"></td>';
  102.                     }
  103.                 }
  104.             }
  105.             ?>
  106.             </tr>
  107.         </table>
  108.     </div>
  109.     <input type="text" value="<?= $Tabla; ?>" name="Tabla" class="InputOculto">
  110.         <input type="text" value="<?= $_GET['Curso']; ?>" name="Curso" class="InputOculto">
  111.     <input type="text" value="<?= $_GET['Ev']; ?>" name="Ev" class="InputOculto">
  112.     <button type="submit" class="Boton1">Guardar cuaderno</button>
  113. </form>
  114. </body>
  115. </html>
  #2 (permalink)  
Antiguo 17/02/2016, 08:32
 
Fecha de Ingreso: octubre-2009
Mensajes: 305
Antigüedad: 14 años, 6 meses
Puntos: 29
Respuesta: Scripts incompatibles

los bloques scripts de jquery debes declararlo en el <HEAD>

Etiquetas: funcion, html, input, jquery, js, php, scripts
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:03.