I want a code so when a textbox has no text in it and a user click the submit button it pops up saying you have not filled in the box!!!
i need to code to be able to have a number of boxes that need information
<script type="text/javascript"> function checkIt() { f = document.theForm; if(f.whatever.value == '' || f.etc.value == '') { alert('Error: You must fill out all required fields.'); return false; } else return true; } </script> <form name="theForm" onsubmit="return checkIt()"> <textarea name="whatever"></textarea> <input type="text" name="etc" /> </form>