Zeile 1 | Zeile 1 |
---|
var question = { refresh: function() {
|
var question = { refresh: function() {
|
var question_id = $("#question_id").attr("value");
| var question_id = $('#question_id').val();
|
$.ajax( { url: 'xmlhttp.php?action=refresh_question&question_id='+question_id,
|
$.ajax( { url: 'xmlhttp.php?action=refresh_question&question_id='+question_id,
|
async: true,
| |
method: 'get', dataType: 'json', complete: function (request)
| method: 'get', dataType: 'json', complete: function (request)
|
Zeile 25 | Zeile 24 |
---|
{ $.each(json.errors, function(i, message) {
|
{ $.each(json.errors, function(i, message) {
|
$.jGrowl(lang.question_fetch_failure + ' ' + message);
| $.jGrowl(lang.question_fetch_failure + ' ' + message, {theme:'jgrowl_error'});
|
}); }
|
}); }
|
else if(json.question)
| else if(json.question && json.sid)
|
{ $("#question").text(json.question);
|
{ $("#question").text(json.question);
|
} if(json.sid) {
| |
$("#question_id").val(json.sid); }
|
$("#question_id").val(json.sid); }
|
var answer_status = $("#answer_status");
| |
|
|
answer_status.removeClass("validation_success") .removeClass("validation_error") .removeClass("validation_loading") .html(""); $('#answer').addClass('textbox'); $('#answer').val('');
| $('#answer').removeClass('error valid').val('').removeAttr('aria-invalid').removeData('previousValue') .next('label').remove();
|
} };
| } };
|