jquery terminal should echo out to screen upon ajax GET completion. Currently, the terminal.echo
wont fire inside a success callback
Tried setting CORS but still wont output. this is a client problem.
jQuery(function ($, undefined) {
$('body').terminal({
register: function (email, user, pw) {
this.echo("register...")
jQuery.ajax({
url: "https://faf3fg.execute-api.us-west-2.amazonaws.com/api/register/" + email +
'/' + user + '/' + pw,
crossDomain: true,
success: function (result) {
this.echo(data);
console.log(data);
},
async: false
});
}
},{
greetings: 'say',
name: 'sterm',
height: $('body').height(),
width: $('body').width(),
prompt: 'sss> ',
completion: true
});
});
I expected it to return the response of the AJAX request at a later time but this seems to be unsupported.