Salve vorrei capire dove sbaglio, ho creato un form con un finale bottone che al click esegue una funzione javascript:
La pagina "ajax.php" a cui invio la richiesta è semplicemente così:codice:function control_form_eventi(){ if($("titoloEvento").value == ""){ alert("Il campo TITOLO deve essere compilato"); return false; } var myRequest = new Request.HTML({ url:"ajax.php", method:"post", data:{"titoloEvento":$("titoloEvento").value }, onRequest: function(){ wait_event.inject("gestione_eventi"); wait_event.set("html", "Req sended!" ); }, onFailure: function(xhr){ alert(xhr); }, onSuccess: function(resp){ wait_event.set("html", resp); } }).send(); }
Come risposta, ottengo "[object Text]"....dove sta l'errore?Codice PHP:if(isset($_POST["titoloEvento"]) ){ echo $_POST["titoloEvento"]; }
Grazie in anticipo![]()

Rispondi quotando