Limit the text field characters to 50 - cannot find function slice in Object 0
<p>I am using this to limit the characters in the Text Field. </p>

<pre><code>textField.value = textField.value.slice(0,50);
textField.value = textField.value.replace(/[^0-9]+/, "");
</code></pre>

<p>I am getting an error, cannot find function slice in Object 0.</p>
