|    
			
				05/10/2006, 13:36
			
			
			  | 
  |   |  |  |  |  Fecha de Ingreso: julio-2003 
						Mensajes: 1.773
					 Antigüedad: 22 años, 3 meses Puntos: 21 |  | 
  |   amigos digamen si es correcto esto me funciono 
  Pero no se si es totalmente correctosaludos
 estes es el motor ajax que me paso el amigo saruman
 
 se llamas ajax.js
 
 function MyAjax() {
 var xmlhttp=false;
 try {
 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
 try {
 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 } catch (E) {
 xmlhttp = false;
 }
 }
 
 if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 xmlhttp = new XMLHttpRequest();
 }
 
 return xmlhttp;
 }
 
 function ClearHTML(sHTML) {
 sHTML = sHTML.replace(/<[^>]*>/gi, "");
 sHTML = sHTML.replace( /\n/gi, "") ;
 sHTML = sHTML.replace(/ /gi, "");
 
 return sHTML;
 }
 
 la pagina que carga es prueba.html es la que se ejecuta primero
 se llama prueba.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" />
 <script language="javascript" src="ajax.js" type="text/javascript"></script>
 <title></title>
 
 
 <script language="Javascript" type="text/javascript">
 //Función para guardar tu informacion en bd utilizando ajax.
 function cargarContenido()
 {
 var miAjaxObj = MyAjax();
 miAjaxObj.open("GET","borrar_temp.php",true);
 miAjaxObj.send(null);
 alert("ejecutado");
 }
 
 </script>
 </head>
 <body onunload="cargarContenido()" >
 
 </body>
 </html>
 
 este es el php que borra una imagen
 <?php
 unlink('Dibujo.JPG');
 ?>
 
 aparentemente funciono pero no se si es totalmente correcto
 saludos
 
 espero sus comentarios
 
				__________________gerardo
     |