Share this post

Link to post

Share on other sites

Thanks, I read through the material and it helps. However, I am still very new to this and I must be missing something. I am trying to use parseInt to convert the user entered number, which is actually a string, into an integer. Then I want to check it using the isNaN function to be sure the user actually entered a number. Regardless of whether I enter a number or letters, it is evaluated as NaN. Here is what I am working with:

Share this post

Link to post

Share on other sites

Thanks for the smiley face information Larry; I thought it might be something like that causing the problem.

HarlleySan, your suggestion of using .value worked for me. However, I am not using the parseInt function now. Do you still see any reason why the parseInt function should be used in this case? Here is what I wrote to test isNaN. I put some extra alert boxes in there so I could see what was happening to the variables, but you can see that I am testing each variable with isNaN.