Jago6060 Posted May 4, 2008 Share Posted May 4, 2008 I am very unfamiliar with JavaScript and I need a simple function that simply checks whether a field is empty or not. I tried this but ti didnt work. Any help would be great. function nameIsBlank() { var name=document.inquiry.name.value; if (name != null) return true; else alert ('Please enter your name!') return false; } Link to comment https://forums.phpfreaks.com/topic/104028-solved-need-help-with-form-validation/ Share on other sites More sharing options...
stockton Posted May 5, 2008 Share Posted May 5, 2008 Have a look at http://www.phpfreaks.com/forums/index.php/topic,195676.0.html to see how I did it. Hope that that helps. Link to comment https://forums.phpfreaks.com/topic/104028-solved-need-help-with-form-validation/#findComment-533410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.