i know who to validate the form . i am using css for the display that's why <ul><li>. the normal way of form.fnam=="" id not throwing any error(i am using alert()) does use of <ul> <li> has anything to do
What programming language do you want to use? You can do it with Javascript, PHP, etc etc etc... be a little more specific for some examples
sorry if i am a bit rude but this is a javascript forum page right. i have sorted out all the php issues but want the user to be warned before he submits
Your onsubmit should look like this: onsubmit="return validate(this)"> HTML: The Javascript part: <script type="text/javascript"> function validate() { var error=''; // an empty error string if ( document.getElementById('F1').value == '' ) { // id="F1" is empty error = error+"\n- F1 cannot be empty."; } if ( document.getElementById('F1').value.length > 15 ) { // id="F1" has more than 15 characters error = error+"\n- F1 cannot be more than 15 characters."; } // add more validation here if (error != '') { // error string is not empty alert('Please correct the following error to continue:'+error) return false; } else { return true; } } </script> HTML:
this is not throwing any alerts here is the actual code http://forums.digitalpoint.com/showthread.php?t=1237858