# HG changeset patch # User Nicholas Jillings # Date 1434641980 -3600 # Node ID ccb62b429a8533667a8bd7951628a1c6f5542185 # Parent a144fd90189f0ca243ad7a4ecf72375301272158 Number option for survey checked to be a number. Throws an error if NaN, before would not store the response. diff -r a144fd90189f -r ccb62b429a85 core.js --- 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; }