Retroceder   Foros del Web > Programación para sitios web > AJAX

Respuesta
 
Herramientas Desplegado
Antiguo 09-abr-2008, 12:10   #1 (permalink)
invenible ha deshabilitado el karma
 
Fecha de Ingreso: marzo-2008
Mensajes: 37
Exclamación ayuda plissss con el siguiente codigo

tengo el siguiente codigo:
Código PHP:
<?php 
    $db 
mysql_connect("localhost","root"); 
    
mysql_select_db("confirmacion",$db); 
    
$texto_consulta "SELECT * FROM ejecutivo"
    
$consulta mysql_query($texto_consulta); 
    
$html "<html><head><title>Herramienta de Confirmacion</title></head><body>"
    
$html $html.""
    
$html.= "<table border = 1><tr><td style='font-weight:bold;'>idejecutivo</td></tr>"
    
$cuantos mysql_num_rows($consulta); 
    for(
$i=0;$i<$cuantos;$i++) 
    { 
          
$arreglo_temporal mysql_fetch_row($consulta); 
          
$html.="<tr><td>".$arreglo_temporal[1]."</td></tr>"
    } 
    
$html.= "</table></body></html>"
                echo 
$html;  
     
?>
lo ke rekiero es ke el campo "$arreglo_temporal[1]" sea un link y cuando se de click me despliegue en otra tabla diferente el nombre del ejecutivo pero ke lo despliegue en la misma pagina
pregunte en ph pero me mandaron para ajax

por favor ayuda
de antemano gracias y saludos
invenible está desconectado   Responder Citando
Antiguo 10-abr-2008, 19:42   #2 (permalink)
marlonbtx sólo puede mejorar
 
Avatar de marlonbtx
 
Fecha de Ingreso: febrero-2006
Ubicación: Tijuana,B.C. Mexico
Mensajes: 146
Enviar un mensaje por MSN a marlonbtx Enviar un mensaje por Yahoo  a marlonbtx Enviar un mensaje por Skype™ a marlonbtx
Re: ayuda plissss con el siguiente codigo

<?php
$db = mysql_connect("localhost","root");
mysql_select_db("confirmacion",$db);
$texto_consulta = "SELECT * FROM ejecutivo";
$consulta = mysql_query($texto_consulta);
$html = "<html><head><title>Herramienta de Confirmacion</title></head><body>";
$html = $html."";
$html.= "<table border = 1><tr><td style='font-weight:bold;'>idejecutivo</td></tr>";
$cuantos = mysql_num_rows($consulta);
for($i=0;$i<$cuantos;$i++)
{
$arreglo_temporal = mysql_fetch_row($consulta);
$html.="<tr><td><a onclick="bringSomeData(this)">".$arreglo_temporal[1]."</a></td></tr>";
}
$html.= "</table></body></html>";
echo $html;

?>
<script type="text/javascript">
function bringSomeData(element)
{
var text = element.innerHTML;
/*AQUI HAS EL AJAX REQUEST , SI NO SABES BUSCA UNO EN GOOGLE O EN LOS FAQ DE ESTE FORO*/
}
</script>
__________________
http://www.cloverinteractive.com ( Host,Email,Web Design,Graphic Design )
marlonbtx está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 15:56.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93