Explore BrainMass

Explore BrainMass

    Javascript : validating form field for numeric value

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a JavaScript function to validate a text field on a form for holding a positive integer value, without using any inbuilt functions like IsNaN and so forth. If the text field contains a valid number then the JavaScript function will return "true", otherwise it will return "false" along with displaying a popup error message.

    © BrainMass Inc. brainmass.com March 4, 2021, 7:43 pm ad1c9bdddf
    https://brainmass.com/computer-science/javascript/javascript-validating-form-field-numeric-value-118393

    Solution Preview

    Following JavaScript function will validate it's argument for being a positive integer. Attached 118393.html shows it in ...

    Solution Summary

    Solution presents a sample javascript function implementation that checks the argument text value for being a positive integer, without using any inbuilt functions for this purpose. Sample html file is also provided with the solution for quick testing.

    $2.49

    ADVERTISEMENT