|
|
@@ -44,7 +44,8 @@ function initialiseTestForm() {
|
|
|
|
|
|
try {
|
|
|
var data = $.parseJSON(data);
|
|
|
- if(!data.success) throw "Unsuccessful.";
|
|
|
+ if(!data.success && data.message) throw data.message;
|
|
|
+ else if(!data.success) throw "Please try again later.";
|
|
|
|
|
|
$submitStatus.html("Submitted. Thank you for participating in this test. You will be redirected to the Tests page in three seconds.");
|
|
|
setTimeout(function() {
|
|
|
@@ -52,7 +53,7 @@ function initialiseTestForm() {
|
|
|
}, 3000);
|
|
|
}
|
|
|
catch(err) {
|
|
|
- $submitStatus.html("Error, please try again later.");
|
|
|
+ $submitStatus.html("Error: " + err);
|
|
|
$submitButton.removeAttr("disabled");
|
|
|
}
|
|
|
},
|