473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

identify if numbers only in a string

Hay.
in one part of my application i have some kind of user and password
form.
it asks for e-mail and a costumer id (as password), the costumer id
must be a number, it's an INT in the SQL table. i tried to use a
javascript checking method, but this kind of checking method seems not
to work at all in firefox, so i'll do the checking via asp.

what i need to know is how to check if a some VAR got anything except
numbers in it?

Nov 20 '06 #1
2 1245
Igal wrote on 20 nov 2006 in microsoft.public.inetserver.asp.general:
what i need to know is how to check if a some VAR got anything except
numbers in it?
<script language='javascript' runat='server'>
function notAllDigits(x){
return /\D/.test(x);
};
</script>

<%
response.write notAllDigits("12345X")
%>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 20 '06 #2
Thanks! that worked just fine.

Evertjan. wrote:
<script language='javascript' runat='server'>
function notAllDigits(x){
return /\D/.test(x);
};
</script>

<%
response.write notAllDigits("12345X")
%>
Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kevin.hall | last post by:
I've got a problem where I have to identify differences in network. The network may have different types of nodes and may only have a string of ring-like topology: Code: A--B--C--D--E or
1
by: Dennis | last post by:
If a Window's form contains two textboxes, txtUserName for names and the other txtDimension for mathematical values, how could the program code be set up to identify that only letter character(s)...
2
by: | last post by:
There is a guy on eBay who is selling several copies of Visual Studio.NET Enterprise Architect 2003. He had the part number listed as X09-60942, but I couldn't find it listed in Microsoft's product...
6
by: Pieter | last post by:
Hi, For some procedures that throws exceptions, I would like to show different messages to the user depending on what type of exception he's getting. For instance this one: when the file is...
1
by: Mahmoud Al-Qudsi | last post by:
Hello, I'm trying to identify whether my C# .NET 2.0 application is running on a Windows x64 or x86 version. I'm trying to avoid checking the version numbers because this will have to work on...
6
by: Ryan Liu | last post by:
Hi, If I want to uniquely identify a computer. I can read CPU ID or Mac Address. I heard, but is this true: some BIOS can block CPU ID from being read? (In this case, will I get an exception,...
10
by: erikcw | last post by:
Hi, I have a list of numbers each with a +/- margin of error. I need to identify which ones overlab each other. For example: 55 +/- 3 20 +/- 2 17 +/- 4 60 +/- 3
3
by: srinithi | last post by:
1.write a program to identify whether a character entered by a user is a vowel or a consonant? 2.write a program to identify whether the number entered by user is even or odd? 3.write a program to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.