Foros del Web » Programando para Internet » PHP »

php ,html y javascript

Estas en el tema de php ,html y javascript en el foro de PHP en Foros del Web. Hola soy programador de PHP y Javascript y tengo una duda que no tengo manera de resolver.No puedo pasar una variable que he capturado en ...
  #1 (permalink)  
Antiguo 05/05/2004, 01:41
 
Fecha de Ingreso: mayo-2004
Mensajes: 1
Antigüedad: 13 años, 7 meses
Puntos: 0
php ,html y javascript

Hola soy programador de PHP y Javascript y tengo una duda que no tengo manera de resolver.No puedo pasar una variable que he capturado en una etiqueta <A HREF> a un objeto div que al principio aparece invisible, de manera que dentro de ese div pueda formar parte de la consulta a una database INFORMIX como una variable mas.Todo funciona bien si le paso un valor fijo en vez de $numero.GRACIAS


El codigo :
<HTML>

<HEAD><TITLE>Consulta </TITLE>=20<style type=3D"text/css">
.hidden {position:absolute; left:50px; top:200px; width:700px; =
height:100%; visibility: hidden; }
.visible { display: none;}
</style>

<script language=3D"JavaScript">


ns4 =3D (document.layers)? true:false
ie4 =3D (document.all)? true:false
numero=3D <? echo $row["num_pet"];?>

function show(id) {
if (ns4) document.layers[id].visibility =3D "show"=20
else if (ie4) document.all[id].style.visibility =3D "visible"
}

function hide(id) {
if (ns4) document.layers[id].visibility =3D "hide"
else if (ie4) document.all[id].style.visibility =3D "hidden"

}
</SCRIPT>
</HEAD>

=20
<BODY >

<?php
include("conexion.php");
=20
$sql =3D "SELECT pet_botiq.*,cod_sit_pedido.descripcion FROM =
pet_botiq,cod_sit_pedido WHERE (pet_botiq.situacion=3D =
cod_sit_pedido.cod_spedido AND pet_botiq.ccc_p =3D$ccc_p AND =
pet_botiq.ccc_n =3D$ccc_n AND pet_botiq.codreg =3D'$codreg') ORDER BY =
pet_botiq.fecha_pet";
$result =3D ifx_query($sql,$con_id) or die ("<BR> couldn't execute the =
query");=20
$result1 =3D ifx_query($sql,$con_id) or die ("<BR> couldn't execute the =
query");
if (!$result ) {
echo "Error en la consulta:", "No se ha encontrado ninguna empresa.";

}
=20
=20
?>


<TABLE WIDTH=3D'100%' BGCOLOR=3D'#FFFFFF' CELLSPACING=3D'0' =
CELLPADDING=3D'0' ALIGN=3D'CENTER' BORDER=3D'0'>

<TR ALIGN=3D'LEFT' VALIGN=3D'BOTTOM'><A =
HREF=3D'consultaempresa.php'><IMG

SRC=3D'./gfx/regresar.gif' ALT=3D'Regresar' ALIGN=3D'LEFT' =
BORDER=3D'0' WIDTH=3D'93'

HEIGHT=3D'21'></A></TR><BR>
<TR BGCOLOR=3D'#000000'width=3D'100%' ALIGN=3D'LEFT' =
VALIGN=3D'TOP'><img src=3D'invisible2.gif' border=3D'0' =
width=3D'0'height=3D'0'>
=20
=20
<?php=20
$row1 =3D ifx_fetch_row ($result1);
echo "<FONT COLOR=3D'#FFFFFF' FACE=3D'Verdana' =
SIZE=3D'-1'><B>Pedidos anteriores de la empresa =
&nbsp;&nbsp;&nbsp;</B></FONT><B><FONT COLOR=3D'#38B0DE' FACE=3D'Verdana' =
SIZE=3D'-1'>".$row1['apeccc']."</B></FONT>";
echo "</TR><BR>";
=20
while ($row =3Difx_fetch_row($result)) {=20
echo "<TABLE WIDTH=3D'100%' BGCOLOR=3D'#FFFFFF' =
CELLSPACING=3D'0' CELLPADDING=3D'0' ALIGN=3D'CENTER' BORDER=3D'1'>";
echo "<TR><TD>";
echo "<TABLE WIDTH=3D'100%' BGCOLOR=3D'#FFFFFF' =
CELLSPACING=3D'0' CELLPADDING=3D'0' ALIGN=3D'CENTER' BORDER=3D'0'>"?>
<TR> <A HREF=3D"#punto1?numero=3D <? echo $row["num_pet"];?>" =
onMouseUp=3D"show('blockDiv');"><img src=3D'gfx/verart0.png' =
ALIGN=3D'LEFT' BORDER=3D'0' WIDTH=3D'54' HEIGHT=3D'25' ismap></A>
<TD width=3D15% height=3D'25' BGCOLOR=3D'#FFFFFF' =
ALIGN=3D'RIGHT'><A HREF=3D"javascript:hide('blockDiv');"><img =
src=3D'gfx/ocultarart.png' ALIGN=3D'LEFT' BORDER=3D'0' WIDTH=3D'54' =
HEIGHT=3D'25'></A>
<?=20
=20
echo "<font face=3D'verdana' size=3D'2' =
color=3D'#800000'><B>N=BA pedido:<B></FONT></TD>"; =20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT' ><B>&nbsp;&nbsp;".$row['num_pet']."</B></TD>";
=20
=20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Fecha pedido:<B></FONT></TD>"; =20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['fecha_pet']."</TD>";=20
echo "</TR>";
=20
echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Estado:<B></FONT></TD>"; =20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['descripcion']."</TD>";
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>E-mail:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['email']."</TD>";=20
echo "</TR>";

echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Direcci=F3n de env=EDo:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['dir_envio']."</TD>";=20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Codigo postal de env=EDo:<B></FONT></TD>";
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['codpos_envio']."</TD>"; =20
=20
echo "</TR>";
echo "<TR>";
=20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Poblaci=F3n de env=EDo:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['pob_envio']."</TD>";=20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Provincia de env=EDo:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['prov_envio']."</TD>";=20
echo "</TR>";
echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>N=BA de colegiado:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['num_colegiado']."</TD>";=20
=20
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Nombre de colegiado:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['nombre_colegiado']."</TD>";=20
echo "</TR>";
echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Observaciones:<B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#FFFFFF' height=3D'25' =
ALIGN=3D'LEFT' colspan=3D'3'>".$row['observaciones']."</TD>";=20
echo "</TR>";
=20
echo "<TR>";
echo "<BR>";
echo "</TABLE>";
echo "</TD></TR>";
echo "</TABLE>";
=20
}
=20
echo "<DIV id=3D'blockDiv' class=3D'hidden' =
value=3D'$numero'><A name=3D'punto1'><TABLE WIDTH=3D'150%' =
BGCOLOR=3D'#FFFFFF' CELLSPACING=3D'0' CELLPADDING=3D'0' ALIGN=3D'CENTER' =
BORDER=3D'1'>El numero es".$numero ;
=20
$criterio =3D" WHERE pet_botiq_detail.num_pet=3D $numero AND =
almarti_botiq.cod_art=3Dpet_botiq_detail.cod_art AND =
syalmarti.codart=3Dpet_botiq_detail.cod_art";
$sql =3D "SELECT =
pet_botiq_detail.*,almarti_botiq.*,syalmarti.ampar t FROM =
pet_botiq_detail,almarti_botiq,syalmarti".$criteri o;=20
$rs =3D ifx_query($sql,$con_id) or die("<BR> couldn't execute =
the query");
echo "<TABLE WIDTH=3D'100%' BGCOLOR=3D'#FFFFFF' =
CELLSPACING=3D'0' CELLPADDING=3D'0' ALIGN=3D'CENTER' =
BORDER=3D'1'></a>";
while($row =3D ifx_fetch_row($rs)){
=20
echo "<TR><TD>";
echo "<TABLE WIDTH=3D'100%' BGCOLOR=3D'#FFFFFF' =
CELLSPACING=3D'0' CELLPADDING=3D'0' ALIGN=3D'CENTER' BORDER=3D'0'>";
echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'RIGHT'>";
echo "<TD width=3D25% BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#800000'><B>Nombre del art=EDculo:&nbsp;&nbsp;</FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'LEFT' colspan=3D'3'><B>".$row['ampart']."</B></TD>";=20
echo "</TR>";
echo "<TR>";
echo "<TD width=3D15% BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Estado:</B></FONT></TD>"; =20
echo "<TD width=3D15% BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$image=3D$row['sit_lin']."</TD>";
echo "<TD width=3D15% BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'RIGHT'><font face=3D'verdana' size=3D'2' =
color=3D'#23238E'><B>Unidades:</B></FONT></TD>"; =20
echo "<TD BGCOLOR=3D'#CCFFFF' height=3D'25' =
ALIGN=3D'LEFT'>".$row['cantaut']."</TD>";=20
echo "</TR>";
echo "</TABLE>";
echo "</TD></TR>";
=20
}
=20
echo "</TABLE>"; =20
echo "<BR></A>";
echo "</DIV>";
=20
=20
@ifx_free_result($result);
@ifx_free_result($result1);
@ifx_close($con_id);
?>

</TABLE>
</BODY>
</HTML>
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 04:23.