Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Manejo de ajax y Frames

Estas en el tema de Manejo de ajax y Frames en el foro de Frameworks JS en Foros del Web. Hola. tengo una pagina de 2 frames de esta mnera Código HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" [PHP]"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns= "http://www.w3.org/1999/xhtml" > <head> ...
  #1 (permalink)  
Antiguo 28/06/2008, 16:41
 
Fecha de Ingreso: abril-2008
Mensajes: 27
Antigüedad: 16 años
Puntos: 0
Manejo de ajax y Frames

Hola. tengo una pagina de 2 frames de esta mnera
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" [PHP]"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
  <frame src="top_bot.php" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="cam_cit.php" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html> 
el top frame llama a una pagina que tiene 3 botones uno carga un ajax y los otros 2 ventanas emergentes. de esta manera

Código PHP:
<?php
    
require_once("../librerias/libreria.postgres.php");
    require_once(
"../librerias/xajax/xajax.inc.php");
    include(
'ing_ref.php');    
    
$xajax = new xajax();
    
$xajax->setCharEncoding('ISO-8859-1');
    
$xajax->registerFunction("carga_referido");
    
$xajax->processRequests();
?>
<script type="text/javascript" src='include/funciones_js.js'></script>

<script type='text/JavaScript' src='include/scw.js'></script>
Código PHP:
<?php 
    $xajax
->printJavascript("../librerias/xajax/"); 
?>
Código:
<script language="javascript">
var objeciones=false
function ventana(x)
{
	if (x==0)
	{
		xajax_carga_referido(document.getElementById('refe').value);
	}
	if(x==1)
	{
		objeciones=window.open("objeciones.php","ref","width=730,height=600,left=100,top=100,scrollbars=yes,menubars=no,statusbar=NO,status=NO,resizable=NO,location=NO")
	}
	if(x==2)
	{
		beneficios=window.open("beneficios.php","ref","width=692,height=385,left=100,top=100,scrollbars=yes,menubars=no,statusbar=NO,status=NO,resizable=NO,location=NO")
	}
}
</script>
Código HTML:
<!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=iso-8859-1" />
<title>Campaña CITIBANK</title>
<link href="estilo.css" rel="stylesheet"  type="text/css" />
</head>

<body>
<script type="text/javascript" src='include/funciones_js.js'></script>
        
<script type='text/JavaScript' src='include/scw.js'></script>
<table border="0" align="center">
	<tr> 
		<td class="table_top"><div align="center">
			<input type="button" class="botonesHover"  id="refe" onClick="ventana(0)" value="Ingresar Referidos">
    		<input type="button" class="botonesHover"  onClick="ventana(1);" value="Ver Objeciones">
	   		<input type="button" class="botonesHover"  onClick="ventana(2);" value="Ver Beneficios"></div></td></tr>
	</tr>
</table>
		  
</body>
</html> 
Lo que deseo es que el primer boton que me envia un resultado que imprimo en el mainframe me lo muestre y no sucede nada el codigo del main frame esta asi

Código HTML:
<div id="referido"></div> 
este div es el resultado del ajax. alguien sabe si es que se puede imprimir un ajax en otra pagina o si de pronto estoy diciendole que imprima mal o algo gracias de antemano.
  #2 (permalink)  
Antiguo 01/07/2008, 08:33
Avatar de foreverOdd  
Fecha de Ingreso: noviembre-2007
Ubicación: Caracas
Mensajes: 489
Antigüedad: 16 años, 5 meses
Puntos: 14
Respuesta: Manejo de ajax y Frames

Hola

Si estas haciendo esto:
Código PHP:

$objResponse
->addAssign("referido","innerHTML",$html); 
el div "referido" tendria que estar en la pagina donde asignaste a funcion xajax
pero quiza puedas hacer esto:

Código PHP:


$objResponse
->addScript("window.mainframe.document.getElementById('referido').innerHTML = '".$HTML."'"); 
espero te ayude
__________________
My path is lit by my own fire, I only go where I desire
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 00:09.