Skip to content

Commit

Permalink
Added 'create_logging_form()
Browse files Browse the repository at this point in the history
  • Loading branch information
EoinTravers committed Oct 15, 2013
1 parent 3f7f897 commit 94431b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,17 @@ function preload_images(image_names, directory) {
return image_array;
};

function create_logging_form(formID, variables_list) {
var form = document.getElementById(formID);
for(var i=0; i < variables_list.length; i++){
var variable = variables_list[i]
var label = document.createTextNode(variable);
var inp = document.createElement("input");
inp.setAttribute('id', variable+'Box');
inp.setAttribute('name', variable+'Out');
var line = document.createElement('br');
form.appendChild(label);
form.appendChild(inp);
form.appendChild(line);
};
};

0 comments on commit 94431b7

Please sign in to comment.