Auto-Form Validation using Javascript

S

skc

I have a FP2000 Form, which I want validated on the fly
using Javascript validation, so the script records the
keystrokes (or focus) and notifies the user of any
breaches:

Here are the 3 items I want validated:

1. Currency amount to 2 dp without the £ sign:
E.g. OK => 800.36
BREACH => 800.362 or 800.2655 or abcd

2. Date to be entered dd/mm/yy with "/":
e.g. OK => 22/01/04
BREACH => 222/01/2004 or anything else

3. Time to be entered hh:mm:
E.g. OK => 11:33
BREACH => 222:33, 44:11 etc..

Please can someone provide me with links to free
Javascript for me to do the above.

Thanks.

skc
 
A

Andrew Murray

Try www.hotscripts.com or http://javascript.internet.com or search google for
"validation scripts".

One suggestion though, you can use Frontpage itself and use the form-validation
feature(s) It will probably do the check(s) you've outlined below, such as
checking time/date formats or that a value is in currency format (for whatever
country you're from - UK? seeing you don't have decimal currency (eg dollars).

The validation sort of uses javascript anyway and I have it working on my site
and I don't have FP extensions installed.



I have a FP2000 Form, which I want validated on the fly
using Javascript validation, so the script records the
keystrokes (or focus) and notifies the user of any
breaches:

Here are the 3 items I want validated:

1. Currency amount to 2 dp without the £ sign:
E.g. OK => 800.36
BREACH => 800.362 or 800.2655 or abcd

2. Date to be entered dd/mm/yy with "/":
e.g. OK => 22/01/04
BREACH => 222/01/2004 or anything else

3. Time to be entered hh:mm:
E.g. OK => 11:33
BREACH => 222:33, 44:11 etc..

Please can someone provide me with links to free
Javascript for me to do the above.

Thanks.

skc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top