Foros del Web » Creando para Internet » HTML »

Probelma con navegador firefox SOLUCIONADO!!!

Estas en el tema de Probelma con navegador firefox SOLUCIONADO!!! en el foro de HTML en Foros del Web. Hola buenas, tengo una pagina que cuando arranca aparece un lightbox para elegir el idioma vale? y se pone en el body onload="funcion" eso en ...
  #1 (permalink)  
Antiguo 26/10/2009, 05:03
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 15 años, 9 meses
Puntos: 13
Probelma con navegador firefox SOLUCIONADO!!!

Hola buenas,
tengo una pagina que cuando arranca aparece un lightbox para elegir el idioma vale?
y se pone en el body onload="funcion"
eso en ie va perfecto pero me he dado cuenta de que en firefox no por la siguiente etiqueta:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

si la quito, me sale bien pero me deforma todo el estilo de la pagina, la he cambiado por otra y nada y si la dejo o pongo otra pues me sale bien en ie pero en firefox no

alguna sugerencia??

Última edición por jdelrioj; 26/10/2009 a las 10:23 Razón: Solucion
  #2 (permalink)  
Antiguo 26/10/2009, 06:07
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 15 años, 9 meses
Puntos: 13
Respuesta: Probelma con navegador firefox

si no lo entendeis o algo decirmelo, llevo todo el dia atascao con esto
  #3 (permalink)  
Antiguo 26/10/2009, 07:34
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: Probelma con navegador firefox

Se entiende, pero poné el código completo para verlo en detalle y probarlo...
__________________
elGastronomo
  #4 (permalink)  
Antiguo 26/10/2009, 07:54
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 15 años, 9 meses
Puntos: 13
Respuesta: Probelma con navegador firefox

este el el js
<!-- Begin

var expDays = 0; // number of days the cookie should last

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

var page = "inicio.html";
var PopupWidth = 700; //Change the PopupWidth to your requirements.
var ScreenWidth = screen.width;//Change to your available screen width.
document.write('<div style="background:#FFFFFF" id="a1">');
document.write('<div id="awesomePopup" style="display:none;">');
document.write('<div style="top:0px">');
document.write('<div id="myid" style="width:650px; height:500px;">');
document.write('<div style="width:650px;height=500px;">');
var frameheight = 500;
if (frameheight > 500) {
var frameheight = 500;
}
document.write('<div style="text-align:center;background:#FFFFFF;width:650px;height =500px;">');
document.write('<img src="/intro/inicio.jpg">');
document.write('<br>');
document.write('<br>');
document.write('<table width="95%">');
document.write('<tr>');
document.write('<td ><img src="/intro/logocruz.jpg"></td><td><img src="/intro/siluetas.jpg"></td>');
document.write('<td width="35" ><a href="http://www.cruzber.com/index.php?lan=es" alt="Español" title="Español"><img src="/intro/spain.jpg" border="0"></a> </td>');
document.write('<td width="35"> <a href="http://www.cruzber.com/index.php?lan=en" alt="English" title="English"><img src="/intro/eng.jpg" border="0"></a> </td>');
document.write(' <td width="35"> <a href="http://www.cruzber.com/index.php?lan=de" alt="Deutsch" title="Deutshc"><img src="/intro/germ.jpg" border="0"></a> <td> ');
document.write('</tr>');
document.write('</table>');
document.write('<br>');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('</div>');
var SetPopup = document.getElementById("popup");
document.write('<div id="popup" style="visibility:hidden;z-index:4;width:100%height:100%;position:absolute;"> </div>');

function StartPopup(objC,c) {
SetPopup = document.getElementById("popup");
SetPopup.innerHTML = c.innerHTML
SetPopup.style.left = (screen.width - PopupWidth)/2 //getPos(objC,"Center");
var ScreenSize = getPos(objC,"Left") + PopupWidth;
if (ScreenSize > ScreenWidth) {
var scrOffsetC = getPos(objC,"Left") + PopupWidth - (ScreenWidth);
SetPopup.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
}
SetPopup.style.top = 90; // getPos(objC,"Top") + objC.offsetHeight))/2;
SetPopup.style.visibility = 'visible';
document.body.innerHTML+='<div id="UpBck" style="position:absolute;width:100%;height:100%;to p:0px;left:0px;background:#004080;filter:alpha(opa city=60);-moz-opacity:0.6;opacity:0.6;">'
UpBck.style.visibility = 'visible';
document.body.style.overflow = "hidden";
}

function getPos(objC,sPos) {
var iPos = 0;
while (objC != null) {
iPos += objC;
objC = objC.offsetParent;
}
return iPos;
}

function CloseAwesomePopup() {
SetPopup = document.getElementById("popup");
SetPopup.style.visibility = 'hidden';
UpBck.style.visibility = 'hidden';
document.body.style.overflow = "auto";
}

function checkCount(delay) {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
popdelay = delay; // time in seconds before popup opens
setTimeout('StartPopup(a1,awesomePopup)', popdelay*1000);
} else {
count++;
SetCookie('count', count, exp);
}
}

function checkCounts() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
StartPopup(a1,awesomePopup);
} else {
count++;
SetCookie('count', count, exp);
}
}

function ShowPop(delay) {
popdelay = delay; // time in seconds before popup opens
setTimeout('StartPopup(a1,awesomePopup)', popdelay*1000);
}

// End -->
  #5 (permalink)  
Antiguo 26/10/2009, 09:06
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: Probelma con navegador firefox

Lo probé en IE6 y va bien, en FF 2.0 me hace lo que decis, sin el doctype lo veo, pero dejandolo no funciona...

La verdad que no se cual podría ser la solución, imagino que podes consultarlo también en el Foro de JS
__________________
elGastronomo
  #6 (permalink)  
Antiguo 26/10/2009, 09:29
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 15 años, 9 meses
Puntos: 13
Respuesta: Probelma con navegador firefox

gracias ya lo solucioné!!!
el problema es que no coge el id de los div

y antes de pj esto

setTimeout('StartPopup(a1,awesomePopup)', popdelay*1000);

tengo que poner esto:

a1 = document.getElementById("a1");
awesomePopup = document.getElementById("awesomePopup");

era problema del js gracias de todas formas
  #7 (permalink)  
Antiguo 27/10/2009, 07:07
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: Probelma con navegador firefox SOLUCIONADO!!!

Bien, me dejo la consulta entre mis favoritas, se que me servirá algún día, porque es algo muy útil...

Saludos y gracias por comentar la solución...
__________________
elGastronomo
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

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 11:13.