Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/09/2012, 10:43
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 7 meses
Puntos: 10
Respuesta: Funcion en Paneles

Hola, lo que estoy utilizando ya lo ves en el cod de#5 (permalink, pero te lo vuelvo a poner con la variable xmlhttp.send("ID=num_usuario"); para que por favor lo revises porque ya te digo al pulsar en Aparatos no me carga el php.

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <script type="text/javascript" src="assets/js/jquery-1.7.2.min.js"></script>
  5. <script type="text/javascript" src="assets/jqueryui/js/jquery-ui-1.8.16.custom.min.js"></script>
  6. <script type="text/javascript" src="assets/js/js.js"></script>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <title>Documento sin título</title>
  9. <link href="estilo1.css" rel="stylesheet" type="text/css" />
  10. <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
  11. <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
  12. <script type="text/javascript">
  13. $(document).ready(function() {    
  14.     $('.button').click(function(){
  15.  
  16.         //Añadimos la imagen de carga en el contenedor
  17.         $('#content').html('<div><img src="imagenes_menu/ajax-loader.gif"/></div>');
  18.  
  19.         var page = $(this).attr('data');        
  20.         var dataString = 'page='+page;
  21.    
  22.         $.ajax({
  23.             type: "GET",
  24.             url: "includes/archivo.php",
  25.             data: dataString,
  26.             success: function(data) {
  27.                 //Cargamos finalmente el contenido deseado
  28.                 $('#content').fadeIn(1000).html(data);
  29.             }
  30.         });
  31.     });              
  32. });    
  33. </script>
  34.   <script>
  35. function enviar_formulario(){
  36.    document.form1.submit()
  37. }
  38. </script>
  39.  <script>
  40. function createAjax(){
  41.    if (window.XMLHttpRequest)
  42.    {
  43.       xmlhttp=new XMLHttpRequest();
  44.    }
  45.    else
  46.    {
  47.       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  48.    }
  49. }
  50.  
  51. function buscarAparatos()
  52. {
  53.     createAjax();
  54.     xmlhttp.onreadystatechange=function()
  55.     {
  56.         if (xmlhttp.readyState==4 && xmlhttp.status==200)
  57.         {
  58.             document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
  59.         }
  60.     }
  61.     xmlhttp.open("GET","buscarAparato.php",true);
  62.     xmlhttp.send("ID=num_usuario");
  63. }
  64. </script>
  65.  <script>
  66. function enviar_formulario1(){
  67.   document.form1.reset();
  68. }
  69. </script>
  70. <script>
  71. function enviar()
  72. {  
  73. var formulario = document.getElementById("");      
  74. var dato = formulario[0];  
  75. if (dato.value=="enviar"){     
  76. alert("Enviando el formulario");       
  77. formulario.submit();       
  78. return true;   
  79. } else {       
  80. alert("No se envía el formulario");    
  81. return false;   }}
  82. </script>
  83. </head>
  84. <body>
  85. <div id="contenedor">
  86. <div id="cabecera">Consulta de intervenciones</div>
  87. <div id="tabla">
  88.     <div id="formulario">
  89.     <form id="frm_filtro" method="post" action="menu1.php" name="form1">
  90.             <table width="685">
  91.   <tr>
  92.     <td width="9%" class="campo_apellidos2">Teléfonos</td>
  93.     <td width="9%"><input name="telefono" type="text" size="9" /></td>
  94.     <td width="9%"><input name="telefono2" type="text" id="telefono2" size="9" /></td>
  95.     <td width="9%"><input name="telefono3" type="text" id="telefono3" size="9" /></td>
  96.     <td width="32%">&nbsp;</td>
  97.     <td width="18%" class="campo_apellidos2">NIF</td>
  98.     <td width="14%"><input name="NIF" type="text" id="NIF" size="9" /></td>
  99.   </tr>
  100.   <tr>
  101.     <td class="campo_apellidos2">Nombre</td>
  102.     <td colspan="4"><input name="nombre_apellidos" type="text" size="30" />
  103.     <td>&nbsp;</td>
  104.     <td>&nbsp;</td>
  105.   </tr>
  106.   <tr>
  107.     <td class="campo_apellidos2">Localidad</td>
  108.     <td colspan="4"><input name="poblacion" type="text" size="30" />
  109.       <span class="campo_apellidos2">C.Postal</span>      <input name="cod_postal" type="text" id="cod_postal" size="5" /></td>
  110.     <td class="campo_apellidos2">Provincia</td>
  111.     <td><input name="provincia" type="text" size="9" /></td>
  112.   </tr>
  113.   <tr>
  114.     <td class="campo_apellidos2">Calle</td>
  115.     <td colspan="4"><input name="calle" type="text" id="calle" size="45" />
  116.       <span class="campo_apellidos2">Nº</span>      <input name="numero" type="text" id="numero" size="5" /></td>
  117.     <td class="campo_apellidos2">Edificio</td>
  118.     <td><input name="edificio" type="text" id="edificio" size="5" /></td>
  119.   </tr>
  120.   <tr>
  121.     <td class="campo_apellidos2">Puerta</td>
  122.     <td colspan="3"><input name="puerta" type="text" id="puerta" size="5" />
  123.       <span class="campo_apellidos2">      Piso</span>
  124.       <input name="piso" type="text" id="piso" size="5" />
  125.       <span class="campo_apellidos2">Letra</span>        <input name="letra" type="text" id="letra" size="5" /></td>
  126.     <td>&nbsp;</td>
  127.     <td><span class="campo_apellidos2">Nº Mante.</span></td>
  128.     <td><input name="mantenimiento" type="text" id="mantenimiento" size="5" /></td>
  129.   </tr>
  130.   </table>
  131.   <table width="100%">
  132.   <tr>
  133.     <th scope="col"><button type="button"  id="btnfiltrar" name="btnfiltrar" style="border:0; margin:0; padding:0;cursor:pointer">
  134.   <img src="imagenes_menu/boton_buscar.png"/>
  135. </button>
  136. </th>
  137.   </tr>
  138. </table>                
  139.           </form>        
  140.  
  141.     </div>
  142.     <div id="paneles">
  143.       <div id="TabbedPanels1" class="TabbedPanels">
  144.         <ul class="TabbedPanelsTabGroup">
  145.           <li class="TabbedPanelsTab" tabindex="0">Usuarios</li>
  146.           <li class="TabbedPanelsTab" tabindex="0" onclick="buscarAparatos();">Aparatos</li>
  147.           <li class="TabbedPanelsTab" tabindex="0">Intervenciones</li>
  148. </ul>
  149.         <div class="TabbedPanelsContentGroup">
  150.           <div class="TabbedPanelsContent">
  151.            <div id="usuario">
  152.             <table width="100%" id="data" class="table-dg-grid" >
  153.              <thead>
  154.               <tr>
  155.        <tr bgcolor=#DFEBFF id=t70 onclick='coloreaf(70,1)' onMouseOver='coloreamosin(70,1)' onMouseOut='coloreamosout(70,1)'>
  156.                     <th><span title="nu_usuario">Nº Usuario</span></th>
  157.                     <th><span title="telefono">Teléfono</span></th>
  158.                     <th><span title="nombre">Nombre</span></th>
  159.                     <th><span title="poblacion">Población</span></th>  
  160.                      </tr>
  161.                 </thead>
  162.                 <tbody>
  163.                 </tbody>
  164.             </table>
  165.                 </div>
  166.           </div>
  167.           <div class="TabbedPanelsContent">
  168.            <div id="aparato">
  169.           <table width="100%" id="data1">
  170.            <thead>
  171.   <tr>
  172.    <tr bgcolor=#DFEBFF id=t70 onclick='coloreaf(70,1)' onMouseOver='coloreamosin(70,1)' onMouseOut='coloreamosout(70,1)'>
  173.                     <th><span title="aparato">Aparato</span></th>
  174.                     <th><span title="marca">Marca</span></th>
  175.                     <th><span title="modelo">Modelo</span></th>
  176.                     <th><span title="NUM_SERIE">Nº Serie</span></th>
  177.                     <th><span title="num_PRODUCTO">Cod/12NC</span></th>
  178.                     <th><span title="FECHA_compra">F.Compra</span></th>
  179.    </tr>
  180.                 </thead>
  181.                 <tbody>
  182.                 </tbody>
  183. </table>
  184. </div>
  185. </div>
  186.           <div class="TabbedPanelsContent">
  187.            
  188.           <table cellpadding="0" cellspacing="0" id="data2">
  189.                 <thead>
  190.                   <tr>
  191.                     <th><span title="num_aviso"></span></th>
  192.                     <th><span title="num_usuario"></span></th>
  193.                     <th><span title="aparato"></span></th>
  194.                     <th><span title="calle"></span></th>
  195.                     <th><span title="fecha_recepcion"></span></th>
  196.                     <th><span title="fecha_recepcion"></span></th>
  197.                     <th><span title="sintoma"></span></th>
  198.                   </tr>
  199.                 </thead>
  200.                 <tbody>
  201.                 </tbody>
  202.               </table>            
  203.           </div>
  204. </div>
  205.       </div>
  206.       <table width="100%">
  207.         <tr>
  208. <th scope="col"><a class="" href="javascript:enviar_formulario()"><span></span><img src="imagenes_menu/generar_aviso1.png" width="150" height="40" border="0"/></a>
  209. </th>
  210.           <th scope="col">&nbsp;</th>
  211.           <th scope="col"></th>
  212.           <th scope="col"><a class="" href="javascript:enviar_formulario1()"><span></span><img src="imagenes_menu/boton_salir.png" width="150" height="40" border="0"/></a>
  213.  </th>
  214.         </tr>
  215.       </table>
  216.     </div>
  217. </div>
  218. </div>
  219. <script type="text/javascript">
  220. var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
  221. </script>
  222. </body>
  223. </html>
  224. <?php
  225. mysql_free_result($Recordset1);
  226. ?>

Última edición por satjaen; 28/09/2012 a las 10:49