function iLoveWriteAnswers () {
loader('show');
callServeToChangeExchange('...', '...').then(function (data) {
if (data) {
for (var i = 3; i--;) {
$('exchange' + (i + 1)).val(data['exchange' + (i + 1)]);
}
}
loader('hide');
count($('#inputValue').val());
});
function loader (status) {
}
function count (status) {
}
}
function callServeToChangeExchange (exchange, operation) {
var defer = $.Deferred();
$.ajax({
url: '/ConventerServlet',
data: {
jsonData: JSON.stringify({
operationCall: operation,
exchange: exchange
})
},
dataType: 'json'
}).done(function (data) {
defer.resolve(data);
}).fail(function () {
defer.resolve();
});
return defer.promise();
}
function iLoveWriteAnswers () {
loader('show');
callServeToChangeExchange('...', '...').then(function (data) {
for (var i = 3; i--;) {
$('exchange' + (i + 1)).val(data['exchange' + (i + 1)]);
}
loader('hide');
count($('#inputValue').val());
});
function loader (status) {
}
}