question about Andy Smith's numeric text boxhttp://forums.asp.net/t/330915.aspx/1?question+about+Andy+Smith+s+numeric+text+boxFri, 05 Sep 2003 17:58:29 -0400330915330915http://forums.asp.net/p/330915/330915.aspx/1?question+about+Andy+Smith+s+numeric+text+boxquestion about Andy Smith's numeric text box i tried using .net text bos and having javascript code for numeric entries and also autotab to next text box but was having prbs. so i downloaded the numeric text box frm http://www.excentricsworld.com/ then i tried to implement 'autotab' with <pre class="prettyprint">and &lt;script LANGUAGE=&quot;JavaScript&quot;&gt; var isNN = (navigator.appName.indexOf(&quot;Netscape&quot;)!=-1); function autoTab(input,len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length &gt;= len &amp;&amp; !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)&#43;1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while(!found &amp;&amp; index &lt; arr.length) if(arr[index] == ele) found = true; else index&#43;&#43;; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i &lt; input.form.length &amp;&amp; index == -1) if (input.form[i] == input) index = i; else i&#43;&#43;; return index; } return true; } function KeyCheck(myfield,e) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (((keycode&gt;47) &amp;&amp; (keycode&lt;58) ) || (keycode==8)) { return true; } else return false; } // End --&gt; &lt;/script&gt;</pre> the same code works fine with regular .NET text box when i can tab to next text box but it doesnt work on this control. so how do i go abt it . thanks. 2003-09-05T17:23:48-04:00330943http://forums.asp.net/p/330915/330943.aspx/1?Re+question+about+Andy+Smith+s+numeric+text+boxRe: question about Andy Smith's numeric text box 1) That is not my control. That site/control belongs to Matt Hawley. My site is metabuilders.com B) He takes over the onkeypress event, which may interfere with your onkeyup handler. 2003-09-05T17:41:56-04:00330951http://forums.asp.net/p/330915/330951.aspx/1?Re+question+about+Andy+Smith+s+numeric+text+boxRe: question about Andy Smith's numeric text box oh ok sorry. for some reason i thgt it was yours. everytime i see your post its usually &quot;download my free control...&quot; :) so it prbly got registered in my mind it was yours. but i think i got a little work around on it. he had a masked text box for ssn as xxx-xx-xxxx. i modified the mask so it takes phone numbers. luckily it even checks for numeric entries. so now i can have one text box for phone number and not 3. this will save me some code also as i dont have to (1) concatenate every time i make an entry into the db and (2) strip it off when i i pull it out of the db. this is prbly temporary solution. so am wondering if i should stick to .net controls or continue with custom controls. thanks andy. 2003-09-05T17:50:24-04:00