Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 13th, 2007, 02:26 AM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ivanlaw Send a message via Yahoo to ivanlaw
Default Numeric Validation

Can the Javascript validate the input whether is numeric o not???
And how is the coding???

Thank you.
Reply With Quote
  #2 (permalink)  
Old August 13th, 2007, 03:39 AM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: Gurgaon, Haryana, India.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vksingh24
Default

JavaScript provides two functions to do this task. refer the code below

function test(x)
{
    var z=x;
    // This function will tell you the data type of the passed value, numeric, string

    alert(typeof(z))

    // This function will tell return true if numeric is not passed or false

    alert(isNaN(z))

}

test(145)


__________________
Vikash Kumar Singh
Reply With Quote
  #3 (permalink)  
Old August 20th, 2007, 04:36 AM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ivanlaw Send a message via Yahoo to ivanlaw
Default

Hi there,
Thank you very much...

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
From numeric to alfa numeric ebekir XSLT 1 August 10th, 2007 06:13 AM
How can i know it's NUMERIC deco Beginning VB 6 1 April 23rd, 2007 06:19 AM
Numeric Up Down Kunkel General .NET 0 April 16th, 2004 10:07 AM
check numeric Tangerine Classic ASP Components 3 March 3rd, 2004 07:37 AM



All times are GMT -4. The time now is 04:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.