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> Link to comment https://forums.phpfreaks.com/topic/58071-solved-check-for-value/ 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. Link to comment https://forums.phpfreaks.com/topic/58071-solved-check-for-value/#findComment-287929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.