Mercurial > hg > webaudioevaluationtool
changeset 2044:a1574e8dfca6
Number option for survey checked to be a number. Throws an error if NaN, before would not store the response.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Thu, 18 Jun 2015 16:39:40 +0100 |
parents | ccbeb4fb7315 |
children | 39f9dd95b8d5 |
files | core.js |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Thu Jun 18 16:26:45 2015 +0100 +++ b/core.js Thu Jun 18 16:39:40 2015 +0100 @@ -204,7 +204,7 @@ this.popupContent.appendChild(span); this.popupContent.appendChild(document.createElement('br')); var input = document.createElement('input'); - input.type = 'number'; + input.type = 'textarea'; if (node.min != null) {input.min = node.min;} if (node.max != null) {input.max = node.max;} if (node.step != null) {input.step = node.step;} @@ -298,7 +298,7 @@ return; } var enteredNumber = Number(input.value); - if (enteredNumber == undefined) { + if (isNaN(enteredNumber)) { alert('Please enter a valid number'); return; }