Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/06/2006, 15:56
August
 
Fecha de Ingreso: febrero-2005
Mensajes: 626
Antigüedad: 19 años, 2 meses
Puntos: 10
Sonrisa Batallando con envio de un simple dato

Estoy haciendo algo asi, en JS

Código PHP:
<script language="javascript" type="text/javascript">
function 
nuevoAjax()

    
    var 
xmlhttp=false
    try 
    { 
        
// Creacion del objeto AJAX para navegadores no 

IE
        xmlhttp
=new ActiveXObject("Msxml2.XMLHTTP"); 
    }
    catch(
e)
    { 
        try
        { 
            
// Creacion del objet AJAX para IE 
            
xmlhttp=new 

ActiveXObject("Microsoft.XMLHTTP"); 
        } 
        catch(
E) { xmlhttp=false; }
    }
    if (!
xmlhttp && typeof XMLHttpRequest!='undefined') { 

xmlhttp=new XMLHttpRequest(); } 

    return 
xmlhttp

function 
cargaDatos(){
ajax=nuevoAjax();
        
ajax.open("POST"

"http://augustino.net/IMA/?resolucion="+screen.width+, true);
        
        
ajax.send(null);
}
</script>
<body onload="nuevoAjax();cargaDatos();">
<img align="top" class="imalogodata" 

src="http://augustino.net/IMA/?id=imalogodata"> 
En PHP, estoy recibiendola y volviendola en variable de session, porque la voy a usar, en una aplicacion especifica

Código PHP:
$_SESSION['resolucion']=$_GET['resolucion']; 
Ustedes diran que porque no le hago asi:

Código PHP:
<script type="text/javascript">
document.write('<img src="http://augustino.net/IMA/?resolucion='+screen.width+'&amp;id=hosting" alt=""/>');
</script> 
No le hago asi por que el validador XHTML Transitional de la W3C, dice que el IMG no puede estar dentro del SCRIPT, y estoy tratando de validar este sitio