Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/09/2008, 13:40
cmarrero
(Desactivado)
 
Fecha de Ingreso: enero-2008
Ubicación: Mendoza
Mensajes: 458
Antigüedad: 17 años
Puntos: 2
Respuesta: onclick y href

Mi codigo java script es el siguiente...

el cual funciona perfectamente si no le pongo el href...

Código PHP:
function xmlhttp(){
        var 
xmlhttp;
        try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
        catch(
e){
            try{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
            catch(
e){
                try{
xmlhttp = new XMLHttpRequest();}
                catch(
e){
                    
xmlhttp false;
                }
            }
        }
        if (!
xmlhttp
                return 
null;
            else
                return 
xmlhttp;
    }

function 
pestana(id){
        var 
cual document.getElementById('pes'+id).name;
        var 
document.getElementById('pescont');
        var 
ajax xmlhttp();
        
ajax.onreadystatechange=function(){
                if(
ajax.readyState==4){
                        
A.innerHTML ajax.responseText;
                    }
            }
        
ajax.open("GET","pestana.php?pes="+encodeURIComponent(cual),true);
        
ajax.send(null);
        return 
false;
    } 
Saludos