Only allow specific set values only
<p>I have a form, I m trying to only allow certain values when submitted.<br/>
Allowed is 1-8, n and blank. That is all.<br/>
I have started on 1-8 but for n and blank I dont know.<br/></p>

<pre><code>function check(form) {
    if (form.scores.value &gt; 8 || form.scores.value &lt;= 0) {
        self.alert(form.scores.value + " is an invalid value! Allowed values are 1 to 8, n and blank");
        form.scores.focus();
    }
}
</code></pre>

<p>HTML </p>

<pre><code>&lt;input type="text" name="scores" id="scores" maxlength="1" size="2" value="&lt;%= number %&gt;" /&gt;
</code></pre>

<p>HTML:</p>

<pre><code>&lt;input type="button" onClick="check(this.form)" value="Edit" /&gt;
</code></pre>

<p>Please help</p>

<p>Thanks</p>
