Advertisement
Gio88

ERRORE AJAX

Jul 24th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. HTML/JAVASCRIPT:
  2. var x=final_transcript;
  3. /*document.cookie= 'cookie_final='+x;
  4. source= langs[select_language.selectedIndex][1][0];
  5. document.cookie= 'cookie_source='+source;
  6.  
  7. dest=langs[select_language2.selectedIndex][1][0];
  8. document.cookie= 'cookie_dest='+dest;
  9. final_span.innerHTML=linebreak=linebreak(final_transcript);
  10. */
  11. source=langs[select_language.selectedIndex][1][0];
  12. dest=langs[select_language2.selectedIndex][1][0];
  13.  
  14. var sorgente= $("#source").val();
  15.  
  16. var destinatario= $("#dest").val();
  17. var testo=$("#x").val();
  18. alert(testo);
  19. $.post("progettoajax.php", {'sorgente':sorgente, 'destinatario':destinatario, 'testo':testo});
  20. PHP:
  21.  
  22. if (isset($_POST['bottone_recupera']))
  23. {
  24.  
  25. $sorgente=$_POST["sorgente"];
  26. $destinatario=$_POST["destinatario"];
  27. $testo=$_POST["testo"];
  28. echo "<script type='text/javascript'>alert('$sorgente');</script>";
  29. echo "<script type='text/javascript'>alert('$destinatario');</script>";
  30. echo "<script type='text/javascript'>alert('$testo');</script>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement