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; } Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.