Funziona tutto, sia il recupero delle informazioni e l'invio delle variabili alla pagina service_save.php, il problema è invece che non esegue le operazioni nella funzione function(data).codice:<html> <head> <title>Ajax</title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $("#send").click(function() { var file = $("#file").val(); var txt = $("#txt").val(); var stop = false; if(file == '') { alert("File vuoto"); stop = true; } if(txt == '') { alert("Txt vuoto"); stop = true; } if(stop == false) { $.post("./service_save.php", {file: file, txt: txt}, function(data){ //$("#message").load("./service.php"); $("#message").html("Wow!"); }); } }); }); </script> </head> <body> <form action="" method="post"> <input id="file" type="text" name="file"> <input id="txt" type="text" name="txt"> <input type="submit" id="send"> <div id="message"></div> </form> </body> </html>
Idee su perchè?![]()

