A lot of jQuery plugins have AJAX support, for example the autocomplete jQuery UI plugin or the form validation plugin.
Most of the documentation about the AJAX support of the plugin is shown using PHP:
Autocomplete:
$(function() {
$( "#birds" ).autocomplete({
source: "search.php",
minLength: 2,
select: function( event, ui ) {
log( ui.item ?
"Selected: " + ui.item.value + " aka " + ui.item.id :
"Nothing selected, input was " + this.value );
}
});
});
Validation plugin:
$("#myform").validate({
rules: {
email: {
required: true,
email: true,
remote: "check-email.php"
}
}
});
My question is know how can this be done using the Flask Framework? And what type of object do I have to return?
Thanks in advance!