mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 00:28:11 +00:00
fix a bug
This commit is contained in:
parent
c0a5a3ab4d
commit
f7407cfe5c
@ -67,6 +67,12 @@ var schema = {
|
||||
|
||||
function end_trial() {
|
||||
|
||||
if (trial.schema.onSubmit.onclick != undefined) {
|
||||
var customized_output = docReady(trial.schema.onSubmit.onclick);
|
||||
if (customized_output)
|
||||
trial_data["#Customized Output#"] = customized_output;
|
||||
}
|
||||
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var question = questions[i]
|
||||
var key = question.question || question.label || question.type;
|
||||
@ -170,13 +176,6 @@ var schema = {
|
||||
trial_data[key] = value;
|
||||
}
|
||||
|
||||
|
||||
if (trial.schema.onSubmit.onclick != undefined) {
|
||||
var customized_output = docReady(trial.schema.onSubmit.onclick);
|
||||
if (customized_output)
|
||||
trial_data["#Customized Output#"] = customized_output;
|
||||
}
|
||||
|
||||
display_element.html('');
|
||||
jsPsych.finishTrial(trial_data);
|
||||
}
|
||||
|
@ -17,8 +17,8 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
function clickToSubmit() {
|
||||
document.getElementById("custom_id_1").value += "Customize actions when submit buttons is pressed.";
|
||||
alert("This is a test. Check Question #7 to see the effect.");
|
||||
document.getElementById("custom_id_1").value += "Customize actions when submit buttons is pressed.";
|
||||
return {"Customized output": "Customize actions when submit buttons is pressed."};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user