Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/11/2012, 13:00
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Tarda en cargar la pagina

Gracias por responder:
Código PHP:
<head>
<script type="text/javascript" src="js_menu/jquery.js"></script>
<script type="text/javascript" src="assets/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="assets/jqueryui/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="assets/js/js.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<link href="estilo1.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js_autocompletado/jquery-1.5.1.min.js"></script>
<script language="JavaScript" src="js_autocompletado/jquery-ui-1.8.13.custom.min.js"></script>
<link type="text/css" href="css_autocompletado/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<?php
include("conexion_autocompletado.php");//se incluyen los datos para realizar la conexion a su base de datos
$con1 "select poblacion,calle,numero,puerta,edificio from dir_usuarios";//consulta para seleccionar las palabras a buscar, esto va a depender de su base de datos
$query mysql_query($con1);
?>
<script>
    $(function() {
        
        <?php
        
        
while($rowmysql_fetch_array($query)) {//se reciben los valores y se almacenan en un arreglo
        
      
$elementos[]= '"'.utf8_encode($row['poblacion']).'"';
      
$elementos1[]= '"'.utf8_encode($row['calle']).' , '.$row['numero'].' ,Edf. '.utf8_encode($row['edificio']).' ,Pta. '.utf8_encode($row['puerta']).'"';
      
}
$arregloimplode(", "$elementos);
$arreglo1implode(", "$elementos1);
//junta los valores del array en una sola cadena de texto

        
?>    
        
        var availableTags=new Array(<?php echo $arreglo?>);
        var availableTags1=new Array(<?php echo $arreglo1?>);//imprime el arreglo dentro de un array de javascript
        
        $( "#poblacion").autocomplete({
            minLength: 4,
            source: availableTags
        
        });
        $( "#calle").autocomplete({
            minLength: 4,
            source: availableTags1
        
        });
    });
    </script>
<?php
include("conexion_autocompletado.php");//se incluyen los datos para realizar la conexion a su base de datos
$con "select nombre,apellidos,telefono,nif,telefono2,telefono3 from usuarios";//consulta para seleccionar las palabras a buscar, esto va a depender de su base de datos
$query mysql_query($con);
?>
<script>
    $(function() {
        
        <?php
        
        
while($rowmysql_fetch_array($query)) {//se reciben los valores y se almacenan en un arreglo
        
      
$elementos[]= '"'.utf8_encode($row['apellidos']).' , '.utf8_encode($row['nombre']).'"';
      
$elementos1[]= '"'.$row['telefono'].'"';
      
$elementos2[]= '"'.$row['nif'].'"';
      
$elementos3[]= '"'.$row['telefono2'].'"';
      
$elementos4[]= '"'.$row['telefono3'].'"';
      
}
$arregloimplode(", "$elementos);
$arreglo1implode(", "$elementos1);
$arreglo2implode(", "$elementos2);
$arreglo3implode(", "$elementos3);
$arreglo4implode(", "$elementos4);
//junta los valores del array en una sola cadena de texto

        
?>    
        
        var availableTags=new Array(<?php echo $arreglo?>);
        var availableTags1=new Array(<?php echo $arreglo1?>);//imprime el arreglo dentro de un array de javascript
        var availableTags2=new Array(<?php echo $arreglo2?>);
        var availableTags3=new Array(<?php echo $arreglo3?>);
        var availableTags4=new Array(<?php echo $arreglo4?>);
                
        $( "#apellidos").autocomplete({
            minLength: 4,
            source: availableTags
        });
        $( "#telefono").autocomplete({
            minLength: 4,
            source: availableTags1
        
        });
        $( "#nif").autocomplete({
            minLength: 4,
            source: availableTags2
        
        });
        $( "#telefono2").autocomplete({
            minLength: 4,
            source: availableTags3
        
        });
        $( "#telefono3").autocomplete({
            minLength: 4,
            source: availableTags4
        
        });
    });
    </script>
</head>
<body>
<div id="tabla">
<div id="cabecera"></div>
    <div id="formulario">
      <div id="TabbedPanels2" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Usuarios</li>
          <li class="TabbedPanelsTab" tabindex="0">Aparatos</li>
        </ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
          <form id="frm_filtro" method="post" action="" name="form1">
          <table width="100%">
  <tr>
    <th width="12%" scope="col" class="alinear_campo_titulo">Teléfonos</th>
    <th width="69%" scope="col"><input name="telefono" type="text" id="telefono" size="8" maxlength="9" />
      <input name="telefono2" type="text" id="telefono2" size="8" maxlength="9" />
      <input name="telefono3" type="text" id="telefono3" size="8" maxlength="9" /></th>
    <th width="10%" scope="col" class="alinear_campo_titulo" >NIF </th>
    <th width="9%" scope="col"><input name="nif" type="text" class="alinear_campo" id="nif" size="8" maxlength="9" /></th>
    </tr>
  <tr>
    <th scope="col" class="alinear_campo_titulo">Nombre</th>
    <th scope="col"><input name="nombre_apellidos" type="text" id="nombre_apellidos" size="20" />
      Apellidos
        <input type="text" name="apellidos" id="apellidos" /></th>
    <th scope="col"class="alinear_campo_titulo">Población</th>
    <th scope="col"><input name="provincia" type="text" class="alinear_campo"  id="provincia" size="8" /></th>
    </tr>
  <tr>
    <th scope="col" class="alinear_campo_titulo">Localidad</th>
    <th scope="col"><input name="poblacion" type="text" id="poblacion" size="40" /></th>
    <th scope="col"class="alinear_campo_titulo">C.Postal</th>
    <th scope="col"><input name="postal" type="text" id="postal" size="6" /></th>
  </tr>
  <tr>
    <th scope="col" class="alinear_campo_titulo">Calle</th>
    <th scope="col"><input name="calle" type="text" id="calle" size="40" /></th>
    <th scope="col"class="alinear_campo_titulo">&nbsp;</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <th scope="col" class="alinear_campo_titulo"> Nº      </th>
    <th scope="col"> <span class="alinear_campo_titulo">
      <input name="numero" type="text" id="numero" size="1" />
      Blq

        <input name="edificio" type="text" id="edificio" size="1" />
    </span>Pta
<input name="puerta" type="text" id="puerta" size="1" />
      <span class="alinear_campo_titulo">Piso
      <input name="piso" type="text" id="piso" size="1" />
        Ltra
        <input name="letra" type="text" id="letra" size="1" />
        E-mail
        <input name="email" type="text" id="email" size="18" />
      </span></th>
    <th scope="col"class="alinear_campo_titulo">&nbsp;</th>
    <th scope="col">&nbsp;</th>
  </tr>
          </table>
          <table width="100%">
  <tr>
    <th scope="col"><button type="button" id="btnfiltrar" name="btnfiltrar" style="cursor:pointer;">
  <img src="imagenes_menu/boton_buscar.jpg" width="100%"/>
</button></th>
  </tr>
</table>
          </form>

          </div>
          <div class="TabbedPanelsContent">Contenido 2</div>
        </div>
      </div>
  </div>
    <div id="paneles">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Usuarios</li>
          <li class="TabbedPanelsTab" tabindex="0" onclick="buscarAparatos();">Aparatos</li>
          <li class="TabbedPanelsTab" tabindex="0">Intervenciones</li>
</ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
           <div id="usuario">
            <table width="100%" id="data" class="table-dg-grid" >
             <thead>
              <tr>
              <th><div id="carga" class="carga"></div></th>
       <tr bgcolor=#DFEBFF id=t70 ondblclick='coloreaf(70,1)' onMouseOver='coloreamosin(70,1)' onMouseOut='coloreamosout(70,1)'>
                     <th><span title="selecc">Selecc.</span></th>
                    <th><span title="nu_usuario">Nº Usuario</span></th>
                    <th><span title="telefono">Teléfono</span></th>
                    <th><span title="nombre">Nombre</span></th>
                    <th><span title="poblacion">Población</span></th> 
                     </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
                </div>
          </div>
          <div class="TabbedPanelsContent" id="pestaña1" >
          
          </div>
          <div class="TabbedPanelsContent">
           
          <table cellpadding="0" cellspacing="0" id="data2">
                <thead>
                  <tr>
                    <th><span title="num_aviso"></span></th>
                    <th><span title="num_usuario"></span></th>
                    <th><span title="aparato"></span></th>
                    <th><span title="calle"></span></th>
                    <th><span title="fecha_recepcion"></span></th>
                    <th><span title="fecha_recepcion"></span></th>
                    <th><span title="sintoma"></span></th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>            
          </div>
</div>
      </div>
    </div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
</script>
</body>
</html>