<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'use Javascript "Onkeypress" command to accept only "numeric".' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'use Javascript "Onkeypress" command to accept only "numeric".' posted on the 'Active Server Pages' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 07:42:08 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 07:42:08 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>use Javascript "Onkeypress" command to accept only "numeric".</title>
      <link>http://www.programmersheaven.com/mb/aspfaq/270638/270638/use-javascript-onkeypress-command-to-accept-only-numeric/</link>
      <description>Good day. Is there a way to filter typed inputs right upon typing the characters using Javascript? i plan on using Javascript's "Onkeypress" command to accept only "numeric, i.e., 1,2,3...", ". (dot)", and ", (comma)" command. please help.thanks in advance.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/aspfaq/270638/270638/use-javascript-onkeypress-command-to-accept-only-numeric/</guid>
      <pubDate>Tue, 17 Aug 2004 20:02:06 -0700</pubDate>
      <category>Active Server Pages</category>
    </item>
    <item>
      <title>Re: use Javascript "Onkeypress" command to accept only "numeric".</title>
      <link>http://www.programmersheaven.com/mb/aspfaq/270638/310402/re-use-javascript-onkeypress-command-to-accept-only-numeric/#310402</link>
      <description>: Good day. Is there a way to filter typed inputs right upon typing the characters using Javascript? i plan on using Javascript's "Onkeypress" command to accept only "numeric, i.e., 1,2,3...", ". (dot)", and ", (comma)" command. please help.thanks in advance.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
=================================================&lt;br /&gt;
Here is your solution&lt;br /&gt;
=================================================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Input Type="Text" Name="txtTerms" Value="" Size="20" Class="txtbk" onKeypress="if (event.keyCode &amp;lt; 44 || event.keyCode &amp;gt; 57 || event.keyCode==45 || event.keyCode==47) event.returnValue = false;"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/aspfaq/270638/310402/re-use-javascript-onkeypress-command-to-accept-only-numeric/#310402</guid>
      <pubDate>Thu, 28 Jul 2005 02:59:09 -0700</pubDate>
      <category>Active Server Pages</category>
    </item>
    <item>
      <title>Re: use Javascript "Onkeypress" command to accept only "numeric".</title>
      <link>http://www.programmersheaven.com/mb/aspfaq/270638/417138/re-use-javascript-onkeypress-command-to-accept-only-numeric/#417138</link>
      <description>Basicallly When we trying to validate a form some time we need numeric validation for textbox.&lt;br /&gt;
 &lt;br /&gt;
We can validate textbox by onkeypress event of the control By checking whether the keycode of the key pressed as the user types falls within the range of the number keys 48-57(i.e 0-9 and '.') ,if not belong to that range it will return false then it will disable the keypress action&lt;br /&gt;
function NumericValidation(eventObj)&lt;br /&gt;
{&lt;br /&gt;
    var keycode;&lt;br /&gt;
 &lt;br /&gt;
    if(eventObj.keyCode) //For IE&lt;br /&gt;
        keycode = eventObj.keyCode;&lt;br /&gt;
    else if(eventObj.Which)&lt;br /&gt;
        keycode = eventObj.Which;  // For FireFox&lt;br /&gt;
    else&lt;br /&gt;
        keycode = eventObj.charCode; // Other Browser&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;http://www.mindfiresolutions.com/Numeric-validation-using-Javascript-612.php&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/aspfaq/270638/417138/re-use-javascript-onkeypress-command-to-accept-only-numeric/#417138</guid>
      <pubDate>Thu, 10 Jun 2010 06:31:55 -0700</pubDate>
      <category>Active Server Pages</category>
    </item>
  </channel>
</rss>
