You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
876 B
JavaScript

$(document).ready(function(){
$('#nerform').submit(
function(e){
e.preventDefault();
var task = $('#task').val();
var model_id = $('#model').val();
var input_text = $('#inputtext').val()
do_task(task, model_id, input_text);
}
);
$.get( "/models")
.done(
function( data ) {
var tmp="";
$.each(data,
function(index, item){
selected=""
if (item.default) {
selected = "selected"
}
tmp += '<option value="' + item.id + '" ' + selected + ' >' + item.name + '</option>'
});
$('#model').html(tmp);
}
);
task_select()
});