Bueno, en una web de encuestas gratuitas me registré y creé una encuesta. A la hora de verla en firefox no se muestra y me "redirecciona" todo el rato, como sino parase de darle a reload. El código es este:
Código HTML:
document.write('<div id="tusencuestas_identificador_3763ec00_a5d5_4402_8b04_cc1a866157d4"></div>');
tusencuestas_addEvent_3763ec00_a5d5_4402_8b04_cc1a866157d4(window,'load',tusencuestas_inicializacion_3763ec00_a5d5_4402_8b04_cc1a866157d4,false);
var accion_extra_3763ec00_a5d5_4402_8b04_cc1a866157d4 = '0';
var P_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4 = '1513';
var Perfil_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4 = '1192';
function tusencuestas_inicializacion_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(4, 0)
}
function tusencuestas_mostrar_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(1, 0);
}
function tusencuestas_verVotos_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(3, 0);
}
function tusencuestas_verListado_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(5, 0);
}
function tusencuestas_verEncuesta_3763ec00_a5d5_4402_8b04_cc1a866157d4(_P_Id)
{
P_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4 = _P_Id;
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(4, 0)
}
function tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(accion_nombre, accion_argumento)
{
if (accion_argumento != "-1")
{
accion_argumento += ";" + accion_extra_3763ec00_a5d5_4402_8b04_cc1a866157d4;
var act = document.createElement("script");
act.src = 'http://www.tusencuestas.com/acciones/tusencuestas.aspx?'+P_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4 +'-'+ Perfil_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4 + '-' + accion_nombre + '-' + accion_argumento + '-3763ec00_a5d5_4402_8b04_cc1a866157d4-0-'+hasVotado_3763ec00_a5d5_4402_8b04_cc1a866157d4()+'&i=' + tusencuestas_random_3763ec00_a5d5_4402_8b04_cc1a866157d4();
act.setAttribute('language', 'javascript');
act.setAttribute('type', 'text/javascript');
document.body.appendChild(act);
}
}
function tusencuestas_votar_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
if (cookieHabilitada_3763ec00_a5d5_4402_8b04_cc1a866157d4())
{
var accion_argumento = tusencuestas_recogeValor_3763ec00_a5d5_4402_8b04_cc1a866157d4();
tusencuestas_accion_3763ec00_a5d5_4402_8b04_cc1a866157d4(2, accion_argumento);
if (accion_argumento != "-1")
{
var expira = new Date();
expira.setSeconds(expira.getSeconds() + 2592000);
setCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4("P_Id" + P_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4, "1", expira, "/");
}
else
{
alert('Elige una respuesta!!');
}
}
else
{
alert('No puedes votar porque no tienes las cookies habilitadas');
}
}
function tusencuestas_recogeValor_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
var tusencuestas_elemento = document.getElementsByName('tusencuestas_respuesta_resultados_name_3763ec00_a5d5_4402_8b04_cc1a866157d4');
var accion_argumento = -1;
var contador = 0;
for (i = 0; i < tusencuestas_elemento.length; i++)
{
if (tusencuestas_elemento[i].type == 'select-one')
{
accion_argumento = tusencuestas_elemento[i].options[tusencuestas_elemento[i].selectedIndex].value;
}
else if (tusencuestas_elemento[i].checked)
{
if (accion_argumento == -1)
{
accion_argumento = "";
}
if (contador>0)
{
accion_argumento += "_" + tusencuestas_elemento[i].value;
}
else
{
accion_argumento += tusencuestas_elemento[i].value;
}
contador++;
}
}
return accion_argumento;
}
function tusencuestas_random_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
var dt = new Date();
var ran=Math.random()*400;
return dt.getTime() + '-' + ran;
}
function hasVotado_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
return getCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4("P_Id" + P_Id_3763ec00_a5d5_4402_8b04_cc1a866157d4)!=null ? 1 : 0;;
}
function cookieHabilitada_3763ec00_a5d5_4402_8b04_cc1a866157d4()
{
var r = tusencuestas_random_3763ec00_a5d5_4402_8b04_cc1a866157d4();
setCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(r,"1");
return getCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(r)!=null;
}
function setCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function getCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
function deleteCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(name, path, domain) {
if (getCookie_3763ec00_a5d5_4402_8b04_cc1a866157d4(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function fixDate_3763ec00_a5d5_4402_8b04_cc1a866157d4(date) {
var base = new Date(0);
var skew = base.getTime();
if (skew > 0)
date.setTime(date.getTime() - skew);
}
function tusencuestas_addEvent_3763ec00_a5d5_4402_8b04_cc1a866157d4(elm, evType, fn, useCapture)
{
if (elm.addEventListener)
{
elm.addEventListener(evType, fn, useCapture);
return true;
}
else if (elm.attachEvent)
{
var r = elm.attachEvent('on' + evType, fn);
return r;
}
else
{
elm['on' + evType] = fn;
}
}