Foros del Web » Programando para Internet » PHP »

Pasar variable de Javascript a PHP

Estas en el tema de Pasar variable de Javascript a PHP en el foro de PHP en Foros del Web. Hola a todos, tengo una pregunta, se que con javascrip puedo detectar la resolucion del motitor del visitante, con esto: Código HTML: <html> <head> <script> ...
  #1 (permalink)  
Antiguo 27/05/2006, 11:52
Avatar de lrunge  
Fecha de Ingreso: agosto-2005
Ubicación: En algun lugar de Caracas
Mensajes: 165
Antigüedad: 18 años, 7 meses
Puntos: 4
Pregunta Pasar variable de Javascript a PHP

Hola a todos, tengo una pregunta, se que con javascrip puedo detectar la resolucion del motitor del visitante, con esto:
Código HTML:
<html> 
<head> 
<script> 
var res, url 
if ((screen.width == 800) && (screen.height == 600)){ 
res="800x600" 
url="800x600.htm"} 
else if ((screen.width == 1024) && (screen.height == 768)){ 
res="1024x768"; 
url="1024x768.htm"} 
else if ((screen.width == 1152) && (screen.height == 864)){ 
res="1152x864"; 
url="1152x864.htm"} 
else if ((screen.width == 1280) && (screen.height == 1024)){ 
res="1280x1024"; 
url="1280x1024.htm"} 
else{ 
window.location.href = "otra.htm"} 
function Entrar(){ 
window.location.href=url} 
</script> 
</head> 
<body> 
Tu Resolución de Pantalla es: <b><script>document.write(res)</script></b><br> 
<a href="javascript:Entrar()">Acceda a la página correspondiente a tu resolución</a> 
</body> 
</html> 
Mi pregunta ahora es: PUEDO PASAR LA VARIABLE RES A UNA VARIABLE EN php??

gRACIAS A LOS QUE ME PUEDAN AYUDAR Y SALUDOS A TODOS

  #2 (permalink)  
Antiguo 27/05/2006, 13:15
Avatar de Nefertiter  
Fecha de Ingreso: enero-2003
Ubicación: Rosario
Mensajes: 1.316
Antigüedad: 21 años, 2 meses
Puntos: 9
donde pones url = .....
pone

url = 'index.php?w='+screen.width +'&h='+ screen.height ;
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:12.