![]() |
Need help for Numeric validation of text fields
Pls help me out !!! :nonod:
I have two text fields in a form that i need to validate to be non-empty and numeric(0-9) only.I have done the non-empty validation, but not able to do the numeric one. Here is my code- Code:
<script language="JavaScript">Code:
<form name="form1" action="success.html" method="post" onsubmit="return onlyNumbers();"> |
Re: Need help for Numeric validation of text fields
Change the script part to this :
HTML Code:
<script language="JavaScript"> |
Re: Need help for Numeric validation of text fields
It worked nicely...thank u vry much...i nearly cracked my head for this !!! :)
|
Re: Need help for Numeric validation of text fields
My pleasure !! :pleased:
|
Re: Need help for Numeric validation of text fields
actually im new here and in js. i want one more function there like the numeric value should be equal to 11digit as mobile number.
i think that code should be like HTML Code:
<script language="JavaScript"> |
| All times are GMT +5.5. The time now is 07:21. |