Entonces el error está dentro la funcion hideuntilthanks_reload
puse unos comentarios en el codigo
Código Javascript
:
Ver originalvar spinner = null;
function hideuntilthanks_reload() {
b1 = b;
// ACA SPINNER SIEMPRE ES NULL (SEGUN ESTE SOLO TROZO DE CODIGO)
// POR LO TANTO LA FUNCION NO PASA DE ESTA LINEA
if (spinner) {
return false;
}
// POR QUE USAS this.spinner AQUÍ ??? POR CASUALIDAD NO QUERRAS USAR LA VARIABLE SPINNER DECLARADA EN LA PRIMERA LINEA ??
this.spinner = new ActivityIndicator("body", {
image : "images/spinner_big.gif"
});
new Ajax.Request('{$mybb->settings[bburl]}/xmlhttp.php?action=hideuntilthanks_reload&my_post_key=' + my_post_key, {
method : 'post',
postBody : "",
onComplete : hideuntilthanks_done
});
return false;
}
function hideuntilthanks_done(request) {
// ES QUE ACA TAMBIEN USAS this.spinner Y SEGUN ESTE TROZO DE CODIGO ESTO SIEMPRE VA A SER NULL
if (this.spinner) {
this.spinner.destroy();
this.spinner = '';
}
if (request.responseText.match(/<error>(.*)<\/error>/)) {
message = request.responseText.match(/<error>(.*)<\/error>/);
alert(message[1]);
} else if (request.responseText) {
$("hide_table").innerHTML = request.responseText;
}
}