Salve a tutti,
ho provato a realizzare una chiamata ad una pagina del mio stesso dominio utilizzando prototype e ajax.request.
Nell'head del documento ho scritto:
Codice PHP:
<script type="text/jscript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
per richiamare prototpe dai server di google e all'interno del body
Codice PHP:
<body>
<script type="text/javascript">
new Ajax.Request('xhr.php', {
method: 'post',
parameters: {email: 'xxx@xxx.com', lista: '1', listguid: 'xxx'},
onSuccess: function(transport){
var notice = $('notice');
var response = transport.responseText || "no response text";
notice.update(response);
//alert("Success! \n\n" + response);
},
onLoading: function(){ notice.update('controllo in corso')},
onFailure: function(){ alert('Something went wrong...') }
});
</script>
<div id="notice">prova</div>
</body>
funziona su IE 7, Safari, Chrome ma non su Firefox 3.
Come è possibile? Dove sbaglio?
Ciao e grazie