I have here a javascript that would able user to input score from -3 to 3 if useNegativeScale becomes TRUE. But I was not able to do that because every time I input "-" plus number, the number will just remove. Let me know what I miss with my code:

Code:
	function testValidity(box, maxScale, useNA, useNegativeScale, nextBox)
	{
		var nScale, minScale, tab, oldValue, space, backspace, del, minNumPad, maxNumPad;
		oldValue = box.value;
		
		tab = 9;
		space = 32;
		backspace = 8;
		del = 46;
		
		if (useNegativeScale == "True")
		{
			var dash, subtract, hyphen;
			
			dash = 189;
			subtract = 109;
			hyphen = 173;
			nScale = 78;
			
			minScale = 48;
			minNumPad = 96;
			
			maxNumPad = minNumPad + (maxScale - minScale);
			
			if(event.keyCode == space || event.keyCode == backspace || event.keyCode == del)
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = "";
			}
			else if(event.keyCode == nScale && useNA == "True")
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = "n";
			}
			else if(event.keyCode == dash || event.keyCode == subtract || event.keyCode == hyphen)
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = "-";
			}
			else if((event.keyCode >= minScale && event.keyCode <= maxScale) || (event.keyCode >= minNumPad && event.keyCode <= maxNumPad))
			{
				if (event.keyCode > maxScale)
				{
					box.value = event.keyCode - 96;
				}
				else
				{
					box.value = event.keyCode - 48;
				}
				
				eval("document.all." + nextBox).focus();
				event.cancelBubble = true;
				event.returnValue = false;
			}
			else if (event.keyCode != tab)
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = oldValue;
				self.alert("<%= pageVals.Item("errors")("invalidvalue") %>");
				box.select();
			}
		}
		else
		{
			minScale = 49;
			minNumPad = 97;
			nScale = 78;
			
			maxNumPad = minNumPad + (maxScale - minScale);
			
			if(event.keyCode == space || event.keyCode == backspace || event.keyCode == del)
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = "";
			}
			else if(event.keyCode == nScale && useNA == "True")
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = "n";
			}
			else if((event.keyCode >= minScale && event.keyCode <= maxScale) || (event.keyCode >= minNumPad && event.keyCode <= maxNumPad))
			{
				if (event.keyCode > maxScale)
				{
					box.value = event.keyCode - 96;
				}
				else
				{
					box.value = event.keyCode - 48;
				}
				
				eval("document.all." + nextBox).focus();
				event.cancelBubble = true;
				event.returnValue = false;
			}
			else if(event.keyCode != tab)
			{
				event.cancelBubble = true;
				event.returnValue = false;
				box.value = oldValue;
				self.alert("<%= pageVals.Item("errors")("invalidvalue") %>");
				box.select();
			}
		}
	}

Below is the HTML code:

Code:
<td style="text-align: center;"><input type="text" onFocus="getElement('TR<%= i %>').className = 'Highlite<%= TRClass %>';" onBlur="getElement('TR<%= i %>').className = '<%= TRType & TRClass %>';" onKeyDown="testValidity(this, '<%= asc(negativeScaleMax) %>', '<%= useNA %>', '<%= useNegativeScale %>', '<% if i = maxQuestion then response.write "sc_scores_" & i else response.write "sc_scores_" & (i + 1) end if %>');" name="sc_scores_<%= i %>" id="sc_scores_<%= i %>" maxlength="2" size="2" value="<%= negativeScaleNum %>" tabIndex="<%= i + 5 %>" /></td>

Thanks,