Validating Input Fields with JavaScript or jQuery <p>I need to check to make sure that four fields have some kind of value in them. I have tried these ideas: <a href="http://stackoverflow.com/questions/11039658/how-to-check-whether-a-select-box-is-empty-using-jquery-javascript">Check whether a select box is empty</a> <a href="http://stackoverflow.com/questions/4855250/how-to-tell-if-a-drop-down-has-options-to-select">How to tell if a DDL has options to select</a></p> <p>My code is currently this:</p> <pre><code> function goToConfirmStep() { var isAllowed = false; var type = $(".#tShowingType option:selected").val(); //DDL var startDate = $("#startDate").text(); //date picker var startTime = $("#startTime option:selected").val(); //DDL var endTime = $("showingLength option:selected").val(); //DDL if (type.val() ) { //&amp;&amp; //(type != null || type != "") //(startDate.text() == "" || startDate.text() == null)) {//&amp;&amp; //($('#startTime').has('option').length &gt; 0) &amp;&amp; //($('#endTime').has('option').length &gt; 0)) { alert("here"); </code></pre> <p>I left the comments in so you can tell what I have tried.</p> <p>If they have values selected (which the 'type' and 'startTime' will have one selected on load), I want to move to the next page. I have an alert on the else to prevent them from moving forward if the fields aren't filled out.</p>