isNan


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: isNan

  1. #1
    Fiona Guest

    isNan


    I'm learning javaScript and am trying to design an order form and am encountering
    difficulty in using isNan.
    The value isn't passing from the HTML input into the JavaScript function.
    Below are some details:

    FUNCTION DETAILS
    function Validate(f){

    if (isNan(value))
    {
    alert ("Please enter a valid number.");
    }
    }
    FORM DETAILS
    <TD>
    <CENTER><INPUT maxLength=1 name=txtCr1 size=1 value =0
    onChange="Validate(order.form)"></CENTER></TD></TR>

    I'd appreciate any help you can give me.
    thanks
    fiona

  2. #2
    Paul Clapham Guest

    Re: isNan

    Your function "Validate" has a parameter whose name is "f". But you don't
    refer to this parameter anywhere in the body of the function. Your call to
    "isNan" refers to some other object named "value" whose declaration I don't
    see here.

    PC2

    Fiona <ulfan@dewey.newcastle.edu.au> wrote in message
    news:39cee603$1@news.devx.com...
    >
    > I'm learning javaScript and am trying to design an order form and am

    encountering
    > difficulty in using isNan.
    > The value isn't passing from the HTML input into the JavaScript function.
    > Below are some details:
    >
    > FUNCTION DETAILS
    > function Validate(f){
    >
    > if (isNan(value))
    > {
    > alert ("Please enter a valid number.");
    > }
    > }
    > FORM DETAILS
    > <TD>
    > <CENTER><INPUT maxLength=1 name=txtCr1 size=1 value =0
    > onChange="Validate(order.form)"></CENTER></TD></TR>
    >
    > I'd appreciate any help you can give me.
    > thanks
    > fiona




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center