Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 988349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:37:32+00:00 2026-05-16T05:37:32+00:00

I was using isNaN function in a Facebook application, but it was not working.

  • 0

I was using isNaN function in a Facebook application, but it was not working. the code that i was using

<script type="text/javascript">
<!--
function postValid(form)
{
 var values=document.getElementById("phone").getValue();

 if(isNaN(values))
 {
    var myDialog = new Dialog(Dialog.DIALOG_POP);
    myDialog.showMessage('Almost Done!', 'Correct Mobile Numbers', button_confirm='Close');
 }
 else
 {
     var myDialog = new Dialog(Dialog.DIALOG_POP);
    myDialog.showMessage('Almost Done!', 'Please Enter Correct Mobile Numbers Please',    button_confirm='Close');
 }     
 }
  //-->
</script>

I have also used Regular expression but not working is there any alternative? or method by FBJS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:37:32+00:00Added an answer on May 16, 2026 at 5:37 am

    Yeah i got the Solution,

    <script type="text/javascript">
    <!--
    function postValid(form)
    {
     var params=form.serialize();
     var values=document.getElementById("phone").getValue();
    
     var numericExpression = /^[0-9]+$/;
    
     if(numericExpression.test(values))
     {
         if(values.length != 10)
         {
             var myDialog = new Dialog(Dialog.DIALOG_POP);
             myDialog.showMessage('Almost Done!', 'Enter 10 Digits',  button_confirm='Close');
             return false;
         }
         else
         {
             return true;
         }
     }
     else
     {
         var myDialog = new Dialog(Dialog.DIALOG_POP);
         myDialog.showMessage('Almost Done!', 'Please Enter Correct Mobile Number Please', button_confirm='Close');
         return false;
     }
    
    
    }
     //-->
     </script>
    

    we can use the Regular expression earlier i used the element.value.match(numericExpression) method which didnt work. if you have any other solution please post so that we can get a better solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using isNaN to evaluate input in text box my function is like
Why this javascript working fine in Firefox but not in IE 6 and 7
I'm working on an online orderform using javascript. I almost have it working, but
Why does the Javascript function call isNaN(123.) return false? (notice the dot (.) after
Is there an isnan() function? PS.: I'm in MinGW (if that makes a difference).
I am using the same code for creating many text boxes. Now for validation
Possible Duplicate: JavaScript logic for isNaN() Hey all I want is to check that
I have a javaScript function that produces a value and inputs it into a
Using a populated Table Type as the source for a TSQL-Merge. I want to
I am using isNan functionto check if entered value is a number: if(isNaN(num)) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.