Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/06/2010, 03:55
pcexpansion
 
Fecha de Ingreso: mayo-2010
Mensajes: 84
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: ayuda con div

lo más fácil es utilizar ajax. Si conoces Prototype es muy fácil.
Descargas las librerías de Prototype: http://www.prototypejs.org/
Las importas desde el html (llamada a archivo javascript)
Ej:
archivo 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>Documento sin t&iacute;tulo</title>

<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
<script src="js/dragdrop.js" type="text/javascript"></script>
<script src="js/ejemplo.js" type="text/javascript"></script> <!-- aquí va la llamada a tú javascript, que llamará al php para actualizar el html del cliente -->

</head>

<body>

<div id="uno">

<!-- llamada a funcion actualizar div dos -->

</div>

<div id="dos">


</div>

</body>
</html>

Archivo javascript:

function actualizar_div_dos() {


new Ajax.Updater('dos', 'php/tu_php.php', {method: 'post', postBody: 'action=tu_accion'});


}


Archivo php:

switch($action) {

case 'tu_accion':

//lo que quieras que se muestre en div dos
break;
__________________
http://www.pcexpansion.es