background
|
|
Games
Ruffnecks Gaming
Gaming for everyone
More icon

RiscOS
Risc OS Info
All you need to know about Risc OS and more.
More icon
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Reference   JavaScript Code Library

IsFormComplete() checks if all elements of a form have a non-blank value. If they do, the function returns 'true', otherwise, it displays an error message, returns 'false', and sets the focus to the blank form element.

Usage: IsFormComplete("theFormName")

Usage notes:
If a given form element is not required, simply set the initial value to a space. This routine should be called from within another javascript routine so that the form may be submitted to the proper CGI upon a return value of TRUE.

Demo (All JavaScript browsers )

Cut, paste, and enjoy!