| Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk |
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member.
Join Date: Aug 2011
Posts: 59
|
javascript validation check
var num= /^[0-9]+$/; do not work . |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Sep 2011
Posts: 112
|
Sorry i dont have any idea about it.
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Nov 2011
Posts: 10
|
Try checking for the presence of non-digit chars and then falsify it.
Code:
var isNonDigitPresent= /\D/g;
if(isNonDigitPresent)
alert('non digit present');
else
alert('it is a number');
|
|
|
|
|
|
#4 |
|
Member.
Join Date: Aug 2011
Posts: 59
|
hey Experts guide
![]() thnx for the reply ur code is not working please help
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jun 2012
Posts: 6
|
please guys help
|
|
|
|
|
|
#6 |
|
Registered User
Join Date: Aug 2012
Posts: 22
|
Try this...
function validateForm() { var x=document.forms["myForm"]["fname"].value; if (x==null || x=="") { alert("First name must be filled out"); return false; ** ** |
|
|
|
|
|
#7 | |
|
Registered User
Join Date: Sep 2012
Posts: 11
|
Quote:
You can check for numerical keystrokes: Code:
jQuery(document).ready(function() {
$("#id").keydown(function(event) {
var digits = [48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105];
var legalKeyCode = (!event.shiftKey) && (jQuery.inArray(event.keyCode, digits) >= 0);
if (legalKeyCode === false) {return false;**
**);
**);
Code:
// Expression: /^[0-9]+$/ // Replace function: .replace(/^[0-9]+$/,"") Last edited by Nullified; 10-19-2012 at 09:47 PM. |
|
|
|
|
|
|
#8 | |
|
Registered User
Join Date: Aug 2012
Posts: 22
|
Quote:
|
|
|
|
|
|
|
#9 |
|
Registered User
Join Date: Sep 2012
Posts: 11
|
Honestly, I didn't expect you to respond. I thought you were a bot or something, thus I apologize for calling you retarded. We all make mistakes. Anyways the thread author never thanked us anyways so ehh.
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Jan 2013
Location: India
Posts: 2
|
why don't you try w3school
|
|
|
|
|
|
#11 |
|
Registered User
Join Date: Sep 2012
Posts: 11
|
ziaht, you're welcome by the way.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MIA June CJ Check | washjob | Making Money with CPC and/or CPM Programs | 2 | 08-19-2001 02:19 AM |
| unidentified flying check | coolshop | Making Money with CPC and/or CPM Programs | 7 | 06-07-2001 11:56 PM |
| search traffic check | Kathy | Making Money with CPC and/or CPM Programs | 23 | 01-12-2001 05:41 AM |
| Anyone get their amazon check? | Kathy | Making Money with CPC and/or CPM Programs | 12 | 11-15-2000 07:15 AM |
| -->How to change the check into money?-->urgent | CYBERWORLD | Making Money with CPC and/or CPM Programs | 14 | 08-29-1999 11:03 PM |
![]()