Mercurial > hg > webaudioevaluationtool
changeset 1777:5aa9ae2a6333
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 | 71f843d91c29 |
children | 3c397e8a5cbd |
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; }