(function ($) { $.DLPHOTELS = function() { $('#DLPR option').remove(); $('#DLPA option').remove(); if($('#DLPHOTELS').val() != "0") var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/rsdates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced, async: false, success: function(html){ $("#DLPA").append(html); } }); }, $.DLPADULTS = function() { $('#DLPA option').remove(); if($('#DLPHOTELS').val() != "") { if($('#DLPR').val() == "TC") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/rsdates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } else if($('#DLPR').val() == "SE") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/dates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } else if($('#DLPR').val() == "CT") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/dates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } else if($('#DLPR').val() == "FD") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/dates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } else if($('#DLPR').val() == "CB") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/dates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } else if($('#DLPR').val() == "WB") { var str = $("#DLPHOTELS").val(); var replaced = str.split(' ').join('_'); $.ajax({ type:"POST", url: "../styles/dates.asp", dataType: "application/x-www-form-urlencoded", data: "Hotel=" + replaced + "&Hotel2=" + $("#DLPR").val(), async: false, success: function(html){ $("#DLPA").append(html); } }); } } } })(jQuery);