Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2010, 21:58
jcbastida
 
Fecha de Ingreso: noviembre-2010
Mensajes: 6
Antigüedad: 13 años, 5 meses
Puntos: 0
Respuesta: problema con apache y dashcode

Cita:
Iniciado por lair Ver Mensaje
Hola.

Como realizas el redireccionamiento??
var DCProductURLs = {
"mobileweb": "../mobile",
"desktop": "../safari"
};

var DCshowiPhone = RegExp(" AppleWebKit/").test(navigator.userAgent) && RegExp(" Mobile/").test(navigator.userAgent);

// allow looking at the Safari widget (desktop) product if ?p=desktop
var DCqs = window.location.search.substring(1);
if (DCshowiPhone && DCqs.length > 0) {
var components = DCqs.split("&");
for (var f = 0; f < components.length; f++) {
if (components[f] == "p=desktop") {
DCshowiPhone = false;
break;
}
}
}

// redirect to the more appropriate product
if (DCProductURLs["mobileweb"] && DCshowiPhone) {
window.location.href = DCProductURLs["mobileweb"];
}