waz Posted July 2, 2007 Share Posted July 2, 2007 i have done what i think should work but it doesnt seem to can someplease highlight what i have done wrong please many thanks <script language="javascript" type="text/javascript"> function showAlert() { if((document.form1.textfield.value.length ! "" && document.form1.textfield2.value.length <> "")) { alert("Please fill out Both Date Values.\n"); return false; } } </script> <form id="form1" name="form1" method="post" action=""> <p> </p> <p> <label> <input type="text" name="textfield" /> </label> </p> <p> <label> <input type="text" name="textfield2" /> </label> </p> <p> <label> <input type="submit" name="Submit" onClick="showAlert()" value="Submit"/> </label> </p> </form> Quote Link to comment Share on other sites More sharing options...
waz Posted July 2, 2007 Author Share Posted July 2, 2007 am trying to check if one textfield has a value if it does what about other one if not msgbox. 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.