English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

ok so i need to know how do i make a field on a form be required when someone is filling it out? I have tried adding a hidden field but it didnt work.. anyone know any html or java that will solve this problem? thanks!

2007-03-26 18:18:33 · 3 answers · asked by Pure Genius 3 in Computers & Internet Programming & Design

if anyone knows the exact javascript please let me know!
thanks

2007-03-26 18:24:16 · update #1

3 answers

http://www.thesitewizard.com/archive/validation.shtml

2007-03-26 21:24:22 · answer #1 · answered by ehossain 2 · 0 0

Here's a sample form with JavaScript included. The onsubmit attribute in the

tag specifies that the validateForm() JavaScript function needs to be called when the user attempts to submit the form, and that the form submission will be allowed *only* if that function returns a true value (i.e., if the form validation succeeds); otherwise, the form submission is cancelled, leaving the user at the existing page.

The validateForm() function itself is defined in the document's , and simply checks whether the myTextField element is empty. If it is, the function returns a false value; otherwise, it returns true.











2007-03-27 02:01:41 · answer #2 · answered by elness 2 · 0 0

Use javascript...

2007-03-27 01:22:16 · answer #3 · answered by jsplashindia 1 · 0 0

fedest.com, questions and answers