$.ajax({ type:'POST', url:'testScript.cgi', data:{'text' : text}, success: function(data) { console.log(data); } dataType: 'json' });