Ver Mensaje Individual
  #15 (permalink)  
Antiguo 02/12/2008, 13:20
Avatar de rudy69
rudy69
 
Fecha de Ingreso: octubre-2008
Ubicación: espndeportes.com
Mensajes: 195
Antigüedad: 16 años, 3 meses
Puntos: 7
Respuesta: onclick ejecutar dos funciones

Código PHP:
<html>
<head>

<title>Registrar Nueva Transaccion</title>

   <script language="javascript" type="text/javascript">
//Validacion de campos de texto no vacios by Mauricio Escobar

function vacio(q) {
        for ( i = 0; i < q.length; i++ ) {
                if ( q.charAt(i) != " " ) {
                        return true
                }
        }
        return false
}

function valida(form1) {
        
        if( vacio(form1.cajero.value) == false ) {
        alert("Seleccione un cajero.")
        return false
        }
        else if( vacio(form1.servicio.value) == false ) {
        alert("Seleccione un servcio.")
        return false
        }         
        else if( vacio(form1.pagador.value) == false ) {
        alert("Introdusca el pagador.")
        return false
        }
        else if( vacio(form1.monto.value) == false ) {
        alert("Introdusca el monto.")
        return false
        }
        else if( vacio(form1.cantidad.value) == false ) {
        alert("Ingrese la cantidad.")
        return false
        }
        else if( vacio(form1.tpais.value) == false ) {
        alert("Introduzca el pais.")
        return false
        }
        else if( vacio(form1.testado.value) == false ) {
        alert("Introduzca el estado.")
        return false
        } 
        else if( vacio(form1.tciudad.value) == false ) {
        alert("Ingrese la ciudad.")
        return false
        }  
          else {
        return true
        }
        
}

</script>

</head>
<body>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td>

<table align="center" border="1" bordercolor="#000000" cellspacing="0" cellpadding="3" width="500">

<form name="buscar remitente" action="transaccion1.php" method="get">

<tr align="center">
<td> 
<b><font color=black size="2" face="arial, helvetica">Remitente&nbsp;</font></b><input type="text" size="29" maxlength="30" name="buscaren">
<input type="submit" name="buscar" value="Buscar"></td></tr>

</form>

<tr>
<td>
<?php

IF(isset($_GET[idr]))
{
$sql="SELECT * FROM remitente WHERE idr='$_GET[idr]'";

$inforemi=mysql_query("$sql"$conexion) or die("Error: ".mysql_error());

IF (
$inforem=mysql_fetch_array($inforemi))
{

?>

<table align="center" border="0" cellspacing="0" cellpadding="3">

<tr bgcolor="#33cc00">
<td colspan="4" width="100%" align="center">
<b><font color=white size="-1" face="arial, helvetica">Informacion del Remitente</font></b>
</td>
</tr>

<tr>
<td colspan="2" align="left">
<b><font color=black size="4" face="arial, helvetica">Remitente: </font></b><font color=black size="-1" face="arial, helvetica"><input size="3" value="<?php echo $inforem['idr']; ?>" disabled></font>
</td>
<td align="right">
<font size="-1" face="arial, helvetica">&nbsp;</font>
</td>
<td> 
&nbsp;
</td>
</tr>

<tr>
<td>
<font size="-1" face="arial, helvetica">Telefono:</font>
</td>
<td colspan="2">
<font size="-1" face="arial, helvetica">Nombre: </font>
</td>
<td rowspan="4">
  
<table align="center" border="0" cellspacing="0" cellpadding="0">

<tr>
<td align="right" valign="middle">


<font size="-1" face="arial, helvetica">Pais: </font>
<input size="15" value="<?php echo $inforem['rpais']; ?>" disabled><br><br>

<font size="-1" face="arial, helvetica">Estado: </font>
<input size="15" value="<?php echo $inforem['restado']; ?>" disabled><br><br>

<font size="-1" face="arial, helvetica">Ciudad: </font>
<input size="15" value="<?php echo $inforem['rciudad']; ?>" disabled><br>

</td>
</tr>
</table>

</td>
</tr>

<tr>
<td>
<input size="8" value="<?php echo $inforem['rtelefono']; ?>" disabled>
</td>
<td colspan="2">
<input size="29" value="<?php echo $inforem['rnombre']; ?>" disabled>
</td>
</tr>

<tr>
  <td colspan="2">
  <font size="-1" face="arial, helvetica">Direccion: </font></td>
  <td>
  <font size="-1" face="arial, helvetica">Code:</font>
</td>

</tr>

<tr>
  <td colspan="2">
  <input size="29" value="<?php echo $inforem['rdireccion']; ?>" disabled></td>
  <td valign="top">
<input size="4" value="<?php echo $inforem['rzipcode']; }} ?>" disabled>
</td>
</tr>

</table>

</td></tr>

<form name="buscar beneficiario" action="transaccion2.php" method="get">

  <input type="hidden" name="idr" value="<?php  echo $_GET[idr]; ?>">

<tr align="center">
<td> 
<b><font color=black size="2" face="arial, helvetica">Beneficiario&nbsp;</font></b><input type="text" size="29" maxlength="30" name="buscaren2">
<input type="submit" name="buscar" value="Buscar"></td></tr>

</form>

<tr>
<td>


<?php

IF (isset($_GET[idb]))
{
$sql="SELECT * FROM beneficiario WHERE idb='$_GET[idb]'";

$infobene=mysql_query("$sql"$conexion) or die("Error: ".mysql_error());

IF (
$infoben=mysql_fetch_array($infobene))
{

?>

<table align="center" border="0" cellspacing="0" cellpadding="3" width="500">

<tr bgcolor="#33cc00">
<td colspan="4" width="100%" align="center">
<b><font color=white size="-1" face="arial, helvetica">Informacion del Beneficiario</font></b>
</td>
</tr>


<tr>
<td colspan="2" align="left">
<b><font color=black size="4" face="arial, helvetica">Beneficiario: </font></b><font color=black size="-1" face="arial, helvetica"><?php echo $infoben['idb']; ?></font>
</td>
<td align="right">
<font size="-1" face="arial, helvetica">&nbsp;</font>
</td>
<td> 
&nbsp;
</td>
</tr>

<tr>
<td>
<font size="-1" face="arial, helvetica">Telefono:</font>
</td>
<td colspan="2">
<font size="-1" face="arial, helvetica">Nombre: </font>
</td>
<td rowspan="4">
  
<table align="center" border="0" cellspacing="0" cellpadding="0">

<tr>
<td align="right" valign="middle">


<font size="-1" face="arial, helvetica">Pais: </font>
<input type="text" size="15" value="<?php echo $infoben['bpais']; ?>"><br><br>

<font size="-1" face="arial, helvetica">Estado: </font>
<input type="text" size="15" value="<?php echo $infoben['bestado']; ?>"><br><br>

<font size="-1" face="arial, helvetica">Ciudad: </font>
<input type="text" size="15" value="<?php echo $infoben['bciudad']; ?>"><br>

</td>
</tr>
</table>

</td>
</tr>

<tr>
<td>
<input type="text" size="9" value="<?php echo $infoben['btelefono']; ?>">
</td>
<td colspan="2">
<input type="text" size="29" value="<?php echo $infoben['bnombre']; ?>">
</td>
</tr>

<tr>
  <td colspan="2">
  <font size="-1" face="arial, helvetica">Direccion: </font></td>
  <td>
  &nbsp;
</td>
</tr>

<tr>
  <td colspan="2">
  <input  size="30" value="<?php echo $infoben['bdireccion']; }}?>"></td>
  <td valign="top">
&nbsp;
</td>
</tr>

</table>

</td>
</tr>