I need to check to make sure that four fields have some kind of value in them. I have tried these ideas: Check whether a select box is empty How to tell if a DDL has options to select
My code is currently this:
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() ) { //&& //(type != null || type != "")
//(startDate.text() == "" || startDate.text() == null)) {//&&
//($('#startTime').has('option').length > 0) &&
//($('#endTime').has('option').length > 0)) {
alert("here");
I left the comments in so you can tell what I have tried.
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.