function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLH
var txt = $('#data').val(); $.ajax({ url: 'hello.php', type: 'post', data : { user: txt }, success: function(data) { alert(data); }, error : function(err, req) { alert("Your browser broke!"); } });