Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/04/2011, 15:39
Avatar de skiper0125
skiper0125
 
Fecha de Ingreso: octubre-2010
Ubicación: $this->Mexico('Toluca');
Mensajes: 1.127
Antigüedad: 13 años, 7 meses
Puntos: 511
Respuesta: Pasar Variables Entre Ventanas

Que tal mixzplit al checar tu codigo parece que esta bien.


antes de que pruebes el codigo que te posteo al final coloca esta linea asi y checa si funciona

Código PHP:
Ver original
  1. echo '<td><input type="button" value="Seleccionar" onClick="javascript: parent.opener.document.insert.marca.value='.$marcas['0'].'; self.close()"></td>';

si no funciona asi checa el codigo de abajo y me comentas haber que sucede si no de lo contrario de pondre mas atencion

Código PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script >
      function coloca(marcas){
          parent.opener.document.insert.marca.value=marcas;
          window.close();
     }

</script>

</head>

<body>
<?php
include("conex.php");


$sql=mysql_query("SELECT mar_codigo,mar_descri FROM dpmarcas");


?>
<div  style="width:490px; position: relative; left: -15px; top: 0px; text-align:center">
<p>

      <table width="441" border = '1' align="center" cellpadding="0" cellspacing="0" class="tablas" >
       <tr style="background:#039; font-family:Tahoma, Geneva, sans-serif;  font-size:22px; color:white">
        <td width="193" class="tabla">Codigo </td>
        <td class="tabla" width="219" align="center">Descripción</td>
        <td class="tabla" width="219" align="center">  </td>                
       </tr>
 <?php
                            
            
//Mostramos los registros
 
while ($marcasmysql_fetch_array($sql))
 {
                
  echo 
'<tr style="font-family:Tahoma, Geneva, sans-serif;  font-size:18px;">';
  echo 
'<td align= "left">'.$marcas['0'].'</td>';
  echo 
'<td align= "left" style="font-style:italic">'.$marcas['1'].'</td>';
  echo 
'<td>'?> <a href="javascript:coloca('<?php echo $marcas['0']; ?>')">selecciona</a> <?php '</td>';
 
  echo 
'</tr>';
            
 }                    
    
mysql_free_result($sql);
?>
</table>

  </div>
</body>
</html>

Saludos
__________________
Recuerda que estamos aquí para orientarte, y no para hacer tu trabajo.
Si mi aporte fue de ayuda, recuerda que agradecer no cuesta nada +1

Skiper0125