java script

Results 1 to 3 of 3

Thread: java script

  1. #1
    Ammy Guest

    Default java script

    How do you check if a parameter is a number in javascript.<BR>i know in vb script, u have isNumeric() function.<BR>Thanks,

  2. #2
    Join Date
    Dec 1969

    Default RE: java script

    Javascript has a isNaN (is Not A Number) function that you can use.<BR><BR>For more info...<BR><BR><BR><BR><BR>HTH<BR><BR>Jerry<BR><BR>

  3. #3
    svk Guest

    Default RE: java script

    Iam Sending Sample Code here.I hope it will work for you.I checked this way.It Worked for me <BR>str = Parameter.value ie Your Field Value<BR>for (var i = 0; i &#060; str.length; i++) <BR> {<BR> var ch = str.substring(i, i + 1);<BR> if ((ch &#060; "0" &#124&#124 "9" &#060; ch)) <BR> {<BR> alert("
    The field accepts only Numbers.")<BR> ....<BR> }<BR> }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts