function loaddatas(typ,campus){ var programType = typ; var divi ='0' ; var dept ='0'; const searchTerm = document.getElementById("courseSearch").value.trim(); $.ajax({ url: "https://christuniversity.in/php/ajax/ajax_course.php", method: 'POST', data: { type: programType,campus: campus,divi:divi, dept:dept , search: searchTerm}, dataType: 'json', success: function(response){ $('.acc-data-created').html(response.desktopHtml); $('.accordion-mob').html(response.mobileHtml); }, error: function(){ alert('Failed to load courses. Please try again.'); } }); } }); function openpopupAdm(course_id, type) { $.ajax({ url: "https://christuniversity.in/php/ajax/ajax_admissionPopup.php", method: "POST", data: { course_id: course_id, type: type }, success: function(response) { $('#exampleModalLabel').text(type); $('#eligibilityBody').html(response); $('#modalEligibility').modal('show'); }, error: function() { $('#eligibilityBody').html('

Error loading content. Please try again.

'); $('#modalEligibility').modal('show'); } }); } function loaddata(typ){ var programType = typ; $.ajax({ url: "https://christuniversity.in/php/ajax/ajax_course.php", method: 'POST', data: { type: programType }, dataType: 'json', success: function(response){ $('.acc-data-created').html(response.desktopHtml); $('.accordion-mob').html(response.mobileHtml); }, error: function(){ alert('Failed to load courses. Please try again.'); } }); } //loaddata('UGP');