Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/10/2008, 04:08
matak
 
Fecha de Ingreso: julio-2008
Ubicación: Alcañiz-Teruel-España
Mensajes: 182
Antigüedad: 15 años, 10 meses
Puntos: 5
Respuesta: preguntita un poco retorcida

Prueba este ejemplillo, es con un poco de ajax, aunque me pienso que habrá mas formas...

index.php
Código HTML:
<script>
//Funcion que crea el objeto ajax
function objetoAjax(){
	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 actualizaContenido(datos){
	divContenido = document.getElementById('contenido');
	ajax=objetoAjax();
	ajax.open("GET", datos);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divContenido.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
}
</script>

<div width="100%">
<table>
  <tbody>
    <tr>
      <td><div style="cursor:pointer;" onclick="javascript: actualizaContenido('1.php');">op1</div></td>
      <td><div style="cursor:pointer;" onclick="javascript: actualizaContenido('2.php');">op2</div></td>
      <td><div style="cursor:pointer;" onclick="javascript: actualizaContenido('3.php');">op3</div></td>
      <td><div style="cursor:pointer;" onclick="javascript: actualizaContenido('4.php');">op4</div></td>
    </tr>
  </tbody>
</table>
</div>
<br>
<div width="100%" id="contenido">
</div> 
Create los archivos 1.php, 2.php, 3.php y 4.php. El contenido de estos será lo que irá cambiando al pulsar las opciones.

Es algo asi lo que preguntas??

Saludos