# Quick javascript question

**URL:** <https://forum.kirupa.com/t/quick-javascript-question/17112>\
**Category:** Uncategorized\
**Created:** [April 1, 2003, 4:06pm UTC](https://forum.kirupa.com/t/quick-javascript-question/17112 "2003-04-01T16:06:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lava](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lava](https://forum.kirupa.com/u/lava)\
**Post date:** [April 1, 2003, 4:06pm UTC](https://forum.kirupa.com/t/quick-javascript-question/17112/1 "2003-04-01T16:06:15Z")

</div>

alright, I’m working with a form in Acrobat, and it’s annoying the hell out of me. I have a field that calculates a result based on other fields. When those other fields are empty, it displays NaN. I dont want it to. So I wrote this bit of code

```php

if (isNaN(event.value))
  event.value = " ";

```

event.value is the value of the field. That’s an acrobat thing… I just want to know if that’s the correct way of checking for not a number.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 1, 2003, 5:10pm UTC](https://forum.kirupa.com/t/quick-javascript-question/17112/2 "2003-04-01T17:10:34Z")

</div>

never mind, I was getting an error, but it was just because Acrobat was being dumb.
