Ver Mensaje Individual
  #15 (permalink)  
Antiguo 19/11/2010, 04:34
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Include dinamico con #

O si querés mantener las variables dentro de la superglobal $_GET:
Código PHP:
<?php 
if(isset($_GET['q'])){
    
$a=$_GET['q'];
    unset(
$_GET);
    
parse_str($a,$_GET);
    echo 
'<pre>';
    
print_r($_GET);
    echo 
'</pre>';
    exit;
}
?>
<!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=utf-8" />
<title>ejemplo</title>
<style type="text/css">
.menu{ width:50px; line-height:20px; font-family:Verdana, Geneva, sans-serif; font-size:10px; background:#F93; cursor:pointer; text-align:center; float:left; margin-right:5px;}
#pp{ clear:both; margin-top:20px;}
</style>
<script type="text/javascript">
function http(){
    if(typeof window.XMLHttpRequest!='undefined'){
        return new XMLHttpRequest();    
    }else{
        try{
            return new ActiveXObject('Microsoft.XMLHTTP');
        }catch(e){
            alert('Su navegador no soporta AJAX');
            return false;
        }    
    }    
}
function request(url,callback,params){
    ns.p=params.q;
    params.q=params.q.split('#').join('')
    var H=new http();
    if(!H)return;
    var p='';
    for(var i in params){
        p+='&'+i+'='+escape(params[i]);    
    }
    H.open('get',url+'?'+p+'&'+Math.random(),true);
    H.onreadystatechange=function(){
        if(H.readyState==4){
            callback(H.responseText);
            H.onreadystatechange=function(){}
            H.abort();
            H=null;
        }
    }
    H.send(null);
}
var ns={}
ns.p=-1;
onload=function(){
        setInterval(function(){if(location.hash!=ns.p){request('<?php echo basename($_SERVER['PHP_SELF']) ?>',function(r){document.getElementById('pp').innerHTML=r;},{'q':location.hash});};},100);
}
</script>
</head>

<body>
<div onclick="location.hash='action=posts&go=view&id=15'" class="menu">a</div>
<div onclick="location.hash='action=OTRA&go=hhh&id=16'" class="menu">b</div>
<div onclick="location.hash='action=BLA&go=jjj&id=17'" class="menu">c</div>
<div onclick="location.hash='action=foo&go=kkk&id=18'" class="menu">d</div>

<div id="pp"></div>

</body>
</html>
Como ves, es más de lo mismo.