pasar una variable de un php a otro de una pantalla a otra y actulizarla en tiempo real
Publicado por alberto (1 intervención) el 09/06/2019 19:37:23
buenas tengo 3 archivos negocio.php seleccion.php y seleccion_ajax.php, en negocio llamo el archivo seleccion que es una nueva pantalla hay guardo un dato pero no logro pasarlo a negocio.php
NEGOCIO.PHP
FUNCION DONDE QUIERO QUE SALGA LA VARIABLE
ARCHICO SELECCION.PHP
ARCHIVO SELECCION_AJAX.PHP
AQUI ES DONDE TENGO LA VARIABLE Y LA PASO A SELECCION.PHP Y LLEGA BIEN ESPERO PUEDAN AYUDARME A PASARLA A NEGOCIO.PHP Y MOSTRARLA
NEGOCIO.PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function buscar{
win = new Window(
{
className: "bluelighting",
title: "Seleccion de Funcionario",
width:750,
height:550,
url: "index.php?nohead=1&m=gestion&d=procesos&a=seleccion",
minimizable:false,
maximizable: false
} );
win.showCenter(true);
}
FUNCION DONDE QUIERO QUE SALGA LA VARIABLE
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
function formSeleccionFuncionario($data = ''){
global $cnx;
ob_start();
?>
<form id="forma_mantenimiento1" name="forma_mantenimiento" onsubmit="return(false)">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td width="140px">Asistente: </td>
<td></td>
<td><div id="donde quiero que salga la variable"></div><button name="btn_sel_fun" id="btn_sel_fun" type="image" width="30" height="25" class="botones" onClick="buscar()">...</button> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
<?php
}
ARCHICO SELECCION.PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script>
function seleccionar_funcionario(funcionario)
{
var f = document.getElementById('forma_mantenimiento');
F.bus_nombre.value = funcionario;
alert(funcionario);
window.parent.close_win_buscar_evento();
}
function salir()
{
window.parent.close_win_buscar_evento();
}
</script>
ARCHIVO SELECCION_AJAX.PHP
1
2
<td class="<?php print set_bground($row,true)?>" name="prueba" onmouseover="setclass(this,'current')" onmouseout="setclassp(this)" onClick="seleccionar_funcionario('<?php print $detalle['nombre_completo']?>')"><?php print $detalle['cedula']?>
</td>
AQUI ES DONDE TENGO LA VARIABLE Y LA PASO A SELECCION.PHP Y LLEGA BIEN ESPERO PUEDAN AYUDARME A PASARLA A NEGOCIO.PHP Y MOSTRARLA
Valora esta pregunta


0