<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Andrea Franceschini ha scritto:
<blockquote
cite="mid4f7364fd0702130918p1bd8d829t2e04baac90fb7675@mail.gmail.com"
type="cite"><br>
function togglePayment(payment) {
<br>
var req = new Ajax.Request(
<br>
<a class="moz-txt-link-rfc2396E" href="http://casper/ajax/server.php">"http://casper/ajax/server.php"</a>,
<br>
{ method: 'get',
<br>
parameters: 'action=togglePayment&parm='+payment,
<br>
asynchronous: true,
<br>
onLoading: function () {
<br>
$('status').innerHTML = "Cambio stato al pagamento
"+payment+"...";
<br>
},
<br>
onSuccess: function (transport) {
<br>
$('status').innerHTML = "Fatto";
<br>
if($('pagamento_'+payment).className == "pagato") {
<br>
$('pagamento_'+payment).className = "nonpagato";
<br>
} else {
<br>
$('pagamento_'+payment).className = "pagato";
<br>
}
<br>
},
<br>
onFailure: function (transport) {
<br>
$('status').innerHTML = transport.responseText;
<br>
}
<br>
}
<br>
)
<br>
}
<br>
<br>
</blockquote>
<br>
visto che non c'e' un firebug per IE (mannaggia) provato a mettere un
alert prima di ogni istruzione delle tue due funzioni ? Giusto per
capire dove si ferma.<br>
<br>
Inoltre visto che usi prototype perche' non usi i suoi metodi/funzioni
per fare le cose ? Tipo al posto di .className usa .addClassName. E al
posto di ".innerHTML = " usa .update(). Cosi' sfrutti prototype al
meglio (visto che è pesante, usiamolo).<br>
<br>
<code>M.</code><br>
</body>
</html>