%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
$(document).ready(function () { $('#search_faclty').on('keyup', function (e) { var q = e.target.value; $('div.staff-container').each(function () { var name = this.children[0].textContent; if (name.search(q) < 0) { $(this).hide(); $('.first-letter').hide(); } else { $(this).show(); $('.first-letter').show(); } }); }); $('#country').change(function () { var country_code = $(this).val(); if (country_code) { $.ajax({ url: $('body').attr('data-base-url') + 'contact/getcountrycode', method: 'post', data: { id: $(this).attr('data-src'), country_code: country_code } }).done(function (response) { $('#country_code').val(response); return false; }); } }); $('#school_id').on('change', function () { this.form.submit(); }); $('#department').on('change', function () { this.form.submit(); }); //10 may by ashutosh $('#programme').on('click', function () { $('.search-by-descipline li').removeClass('active'); $('.search-by-descipline li').removeClass('selected'); $('.search-by-descipline .tab-pane').removeClass('active'); $($('.search-by-descipline .tab-pane')[0]).addClass('active'); $('#programme').addClass('active'); }); $('#discipline').on('click', function () { $('.search-by-descipline li').removeClass('active'); $('.search-by-descipline li').removeClass('selected'); $('.search-by-descipline .tab-pane').removeClass('active'); $($('.search-by-descipline .tab-pane')[1]).addClass('active'); $('#programme').addClass('selected'); $('#discipline').addClass('active'); }); $('#course').on('click', function () { $('.search-by-descipline li').removeClass('active'); $('.search-by-descipline li').removeClass('selected'); $('.search-by-descipline .tab-pane').removeClass('active'); $($('.search-by-descipline .tab-pane')[2]).addClass('active'); $('#programme').addClass('selected'); $('#discipline').addClass('selected'); $('#course').addClass('active'); }); $('#search-course-input').on('keyup', function (e) { var q = e.target.value.replace('.', '').toLowerCase(); $('.keyword-search-results li').each(function () { $(this).addClass('hidden'); if (q != "") { var name = this.children[0].textContent.replace('.', '').toLowerCase(); if (name.includes(q) > 0) { $(this).removeClass('hidden'); } } }); }) //end $("#back_step_one").on("click", function (e) { $('#undergraduate-lnk').addClass('active'); $('#discipline-lnk').removeClass('active'); }); $("#back_step_two").on("click", function (e) { $('#discipline-lnk').addClass('active'); $('#select-course-lnk').removeClass('active'); }); $("#mob_department_link").on("click", function (e) { $('#school-lnk').addClass('active'); $('#deparement-lnk').removeClass('active'); }); /* * Onchange Get Newsletter details */ $('#school_newsletters').change(function () { var school_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'connect/getNewsletters', method: 'post', data: { id: $(this).attr('data-src'), school_id: school_id } }).done(function (response) { $('.download-newsletter').html(''); $('.download-newsletter').html(response); }); }); /* * Onchange Get Newsletter details */ $('#sharda_experience').change(function () { this.form.submit(); }); /* * Onchange Get Newsletter details */ $('#school_results').change(function () { var school_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'admissions/getExamResults', method: 'post', data: { id: $(this).attr('data-src'), school_id: school_id } }).done(function (response) { $('.download-results').html(''); $('.download-results').html(response); }); }); /* * Onchange Get Examination Schedule */ $('#school_schedule').change(function () { var school_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'admissions/getExamSchedule', method: 'post', data: { id: $(this).attr('data-src'), school_id: school_id } }).done(function (response) { $('.download-results').html(''); $('.download-results').html(response); }); }); /* * Onchange Get Course details */ $('#programmecourse').change(function () { var programme_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'apply/getProgrammeDiscipline', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('#disciplinecourse').html(''); $('#disciplinecourse').append($('<option>').text(' -- Select Discipline -- ').attr('value', '')); $.each(response, function (i, value) { $('#disciplinecourse').append($('<option>').text(value).attr('value', i)); }); }); }); $('#disciplinecourse').change(function () { var programme_id = $("#programmecourse").val(); var discipline_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'admissions/getdisciplinecourse', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id, discipline_id: discipline_id } }).done(function (response) { $('#pagination_div').hide(); $('.course-response').html(''); $('.course-response').html(response); }); }); $('#globalprogrammecourse').change(function () { var programme_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'apply/getProgrammeDiscipline', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('#globaldisciplinecourse').html(''); $('#globaldisciplinecourse').append($('<option>').text(' -- Select Discipline -- ').attr('value', '')); $.each(response, function (i, value) { $('#globaldisciplinecourse').append($('<option>').text(value).attr('value', i)); }); }); }); $('#globaldisciplinecourse').change(function () { var programme_id = $("#globalprogrammecourse").val(); var discipline_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'international/getdisciplinecourse', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id, discipline_id: discipline_id } }).done(function (response) { $('#pagination_div').hide(); $('.course-response').html(''); $('.course-response').html(response); }); }); $('#programme').change(function () { var programme_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'apply/getProgrammeDiscipline', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('#discipline').html(''); $('#discipline').append($('<option>').text(' -- Select Discipline -- ').attr('value', '')); $.each(response, function (i, value) { $('#discipline').append($('<option>').text(value).attr('value', i)); }); }); }); $('#discipline').change(function () { var programme_id = $("#programme").val(); var discipline_id = $(this).val(); $.ajax({ url: $('body').attr('data-base-url') + 'apply/getDisciplineCourse', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id, discipline_id: discipline_id } }).done(function (response) { $('#course').html(''); $('#course').append($('<option>').text(' -- Select Course -- ').attr('value', '')); $.each(response, function (i, value) { $('#course').append($('<option>').text(value).attr('value', i)); }); }); }); $(".footer").on("click", ".modalButtonViewCourse", function (e) { var id = $(this).attr('data-src'); var programme_id = $(this).attr('data-value'); $.ajax({ url: $('body').attr('data-base-url') + 'academics/getCoursePopup', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('#courseModal').find('.modal-body').html(response); $('#courseModal').modal('show'); }) }); /* * * Onclick : scholarship-form */ $("#websearch").on("click", function () { $('#global-search .fa-search').hide(); }); /* *Onclick : getdetails */ $("#websearch").on("click", function () { $('#global-search .fa-search').hide(); }); $(".getapplydetails").on("click", function () { $('.havesuEdage').show(); $('.apply-form').hide(); }); $("#findpeople").on("click", function () { $('#global-search .fa-search').show(); }); /* * * Onclick : scholarship-form */ $(".scholarship-form").on("click", function (e) { // Custom Values var name = $("#name").val(); var email_id = $("#email").val(); var mobile = $("#mobile").val(); var country = $("#country").val(); var city = $("#city").val(); var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; // Hoidden values var programme = $("#programme").val(); var discipline = $("#discipline").val(); var course = $("#course").val(); $("#email_id_msg").remove(); $("#full_name_msg").remove(); $("#mobile_msg").remove(); $("#state_msg").remove(); $("#country_msg").remove(); $("#programme_msg").remove(); $("#discipline_msg").remove(); $("#course_msg").remove(); $("#email").parent().removeClass('has-error'); $("#name").parent().removeClass('has-error'); $("#mobile").parent().removeClass('has-error'); $("#country_row").parent().removeClass('has-error'); $("#city_row").parent().removeClass('has-error'); $("#programme_row").parent().removeClass('has-error'); $("#discipline_row").parent().removeClass('has-error'); $("#course_row").parent().removeClass('has-error'); var error_flag = 'N'; if (name == '') { $("<span style='color:red;' id='full_name_msg'>Please enter full name.</span>").insertAfter("#name"); $("#name").parent().addClass('has-error'); error_flag = 'Y'; } if (email_id == '') { $("<span style='color:red;' id='email_id_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (email_id != '' && !emailReg.test(email_id)) { $("<span style='color:red;' id='email_id_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (country == '') { $("<span style='color:red;' id='country_msg'>Please select your country name</span>").insertAfter("#country_row"); $("#country_row").parent().addClass('has-error'); error_flag = 'Y'; } if (mobile == '') { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } if (city == '') { $("<span style='color:red;' id='city_msg'>Please enter your city.</span>").insertAfter("#city"); $("#city").parent().addClass('has-error'); error_flag = 'Y'; } if (programme == '') { $("<span style='color:red;' id='programme_msg'>Please select programme.</span>").insertAfter("#programme_row"); $("#programme_row").parent().addClass('has-error'); error_flag = 'Y'; } if (discipline == '') { $("<span style='color:red;' id='discipline_msg'>Please select programme discipline.</span>").insertAfter("#discipline_row"); $("#discipline_row").parent().addClass('has-error'); error_flag = 'Y'; } if (course == '') { $("<span style='color:red;' id='course_msg'>Please select course.</span>").insertAfter("#course_row"); $("#course_row").parent().addClass('has-error'); error_flag = 'Y'; } if (error_flag == 'Y') { return false; } }); /* * onclick : getintouch */ $(".getintouch").on("click", function (e) { // Custom Values var name = $("#name").val(); var email = $("#email").val(); var mobile = $("#mobile").val(); var country_code = $("#country_code").val(); var remarks = $("#remarks").val(); var country = $("#country").val(); var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $("#email_msg").parent().remove(); $("#name_msg").parent().remove(); $("#mobile_msg").parent().remove(); $("#country_msg").parent().remove(); $("#remarks_msg").parent().remove(); var error_flag = 'N'; if (name == '') { $("<span style='color:red;' id='name_msg'>Please enter full name.</span>").insertAfter("#name"); $("#name").parent().addClass('has-error'); error_flag = 'Y'; } if (email == '') { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (mobile == '') { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } if (country == '') { $("<span style='color:red;' id='country_msg'>Please select your country.</span>").insertAfter("#country_row"); $("#country_row").parent().addClass('has-error'); error_flag = 'Y'; } if (remarks == '') { $("<span style='color:red;' id='remarks_msg'>Please enter your remarks</span>").insertAfter("#remarks"); $("#remarks_row").parent().addClass('has-error'); error_flag = 'Y'; } if (error_flag == 'N') { $('.submit_info').show(); $.ajax({ url: $('body').attr('data-base-url') + 'contact/addEnquiry', method: 'post', data: { name: name, email: email, mobile: mobile, country: country, country_code: country_code, remarks: remarks, enquiry_source: 'Get in Touch' } }).done(function (response) { $("#name").val(''); $("#email").val(''); $("#mobile").val(''); $("#remarks").val(''); $("#country").val(''); $('.submit_info').hide(); $("#request_success").html('<p ng-bind="callbackopt_success_message">' + response + '</p>'); setTimeout(function () { $('#request_success').slideUp("slow"); }, 5000); return false; }) } return false; }); // save school enquiry_source $(".schoolEnquiry").on("click", function (e) { // Custom Values var name = $("#name").val(); var email = $("#email").val(); var mobile = $("#mobile").val(); var country = $("#country").val(); var country_code = $("#country_code").val(); var state = $("#state").val(); var course_discipline = $("#source").val(); var gender = $('input:radio[name=gender]:checked').val(); if (typeof gender == 'undefined') { gender = ''; } var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $("#email_msg").remove(); $("#name_msg").remove(); $("#mobile_msg").remove(); $("#country_msg").remove(); $("#state_msg").remove(); $("#gender_msg").remove(); $("#name").parent().removeClass('has-error'); $("#email").parent().removeClass('has-error'); $("#mobile").parent().removeClass('has-error'); $("#gender_row").parent().removeClass('has-error'); $("#country_row").parent().removeClass('has-error'); $("#state").parent().removeClass('has-error'); var error_flag = 'N'; if (name == '') { $("<span style='color:red;' id='name_msg'>Please enter full name.</span>").insertAfter("#name"); $("#name").parent().addClass('has-error'); error_flag = 'Y'; } if (email == '') { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (mobile == '') { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } if (gender == '') { $("<span style='color:red;' id='gender_msg'>Please select your gender.</span>").insertAfter("#gender_grup"); $("#gender_row").parent().addClass('has-error'); error_flag = 'Y'; } if (country == '') { $("<span style='color:red;' id='country_msg'>Please select your country.</span>").insertAfter("#country_row"); $("#country_row").parent().addClass('has-error'); error_flag = 'Y'; } if (state == '') { $("<span style='color:red;' id='state_msg'>Please enter state.</span>").insertAfter("#state"); $("#state").parent().addClass('has-error'); error_flag = 'Y'; } if (error_flag == 'N') { $('.submit_info').show(); $.ajax({ url: $('body').attr('data-base-url') + 'contact/addEnquiry', method: 'post', data: { name: name, email: email, mobile: mobile, country: country, country_code: country_code, state: state, course_discipline: course_discipline, enquiry_source: 'School Enquiry' } }).done(function (response) { $('.submit_info').hide(); $('#schoolform')[0].reset(); $("#request_success").html('<p ng-bind="callbackopt_success_message">' + response + '</p>'); setTimeout(function () { $('#request_success').slideUp("slow"); }, 5000); return false; }) } return false; }); $("#request_info").on("click", function (e) { // Custom Values var name = $("#name").val(); var email = $("#email").val(); var mobile = $("#mobile").val(); var country = $("#country").val(); var country_code = $("#country_code").val(); var state = $("#state").val(); var marks_10 = $("#marks_10").val(); var marks_12 = $("#marks_12").val(); var user_type = $('input:radio[name="user_type"]:checked').val(); var gender = $('input:radio[name=gender]:checked').val(); if (typeof user_type == 'undefined') { user_type = ''; } if (typeof gender == 'undefined') { gender = ''; } var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; // Hoidden values var course_type = $("#course_type").val(); var course_discipline = $("#course_discipline").val(); var course_name = $("#course_name").val(); $("#email_msg").remove(); $("#name_msg").remove(); $("#mobile_msg").remove(); $("#gender_msg").remove(); $("#user_type_msg").remove(); $("#state_msg").remove(); $("#country_msg").remove(); $("#email").parent().removeClass('has-error'); $("#name").parent().removeClass('has-error'); $("#mobile").parent().removeClass('has-error'); $("#country_row").parent().removeClass('has-error'); $("#state_row").parent().removeClass('has-error'); $("#user_type_row").parent().removeClass('has-error'); $("#gender_row").parent().removeClass('has-error'); var error_flag = 'N'; if (email == '') { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("<span style='color:red;' id='email_msg'>Please enter your email id.</span>").insertAfter("#email"); $("#email").parent().addClass('has-error'); error_flag = 'Y'; } if (name == '') { $("<span style='color:red;' id='name_msg'>Please enter full name.</span>").insertAfter("#name"); $("#name").parent().addClass('has-error'); error_flag = 'Y'; } if (mobile == '') { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("<span style='color:red;' id='mobile_msg'>Please enter 10 digit valid mobile number.</span>").insertAfter("#mobile"); $("#mobile").parent().addClass('has-error'); error_flag = 'Y'; } if (country == '') { $("<span style='color:red;' id='country_msg'>Please select your country name</span>").insertAfter("#country_row"); $("#country_row").parent().addClass('has-error'); error_flag = 'Y'; } if (state == '') { $("<span style='color:red;' id='state_msg'>Please select your state.</span>").insertAfter("#state_row"); $("#state_row").parent().addClass('has-error'); error_flag = 'Y'; } if (user_type == '') { $("<span style='color:red;' id='user_type_msg'>Please select your type.</span>").insertAfter("#user_type_row"); $("#user_type_row").parent().addClass('has-error'); error_flag = 'Y'; } if (gender == '') { $("<span style='color:red;' id='gender_msg'>Please select your gender.</span>").insertAfter("#gender_row"); $("#gender_row").parent().addClass('has-error'); error_flag = 'Y'; } if (error_flag == 'N') { $('.submit_info').show(); $.ajax({ url: $('body').attr('data-base-url') + 'requestinfo/addRequestInfo', method: 'post', data: { name: name, email: email, mobile: mobile, country: country, country_code: country_code, state: state, marks_10: marks_10, marks_12: marks_12, user_type: user_type, gender: gender, course_type: course_type, course_discipline: course_discipline, course_name: course_name } }).done(function (response) { $('#requestinfo')[0].reset(); $("#request_success").html(''); $('.submit_info').hide(); $("#request_success").html(response); setTimeout(function () { $('#request_success').slideUp("slow"); }, 15000); return false; }) } return false; }); /* * Go Back section */ $(".gobackstep1").on("click", function (e) { $("#step2").hide(); $("#step1").show(); $("#applystep2").removeClass('active'); $("#applystep2a").removeClass('active'); $("#applystep3").removeClass('active'); $("#applystep4").removeClass('active'); return false; }); /* * Go Back section */ $(".gobackstep2").on("click", function (e) { $("#step3").hide(); $("#step2").show(); $("#applystep3").removeClass('active'); $("#applystep4").removeClass('active'); return false; }); /* * Go Back section */ $(".gobackstep3").on("click", function (e) { $("#step4").hide(); $("#step3").show(); $("#applystep4").removeClass('active'); return false; }); /* Onclick : getUserDetails * */ $("#getUserDetails").on("click", function (e) { var suedgeid = $("#su_edge_id").val(); $("#suedge_div").parent().removeClass('has-error'); var error_flag = 'N'; if (suedgeid == '') { $("#suedge_div").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { $.ajax({ url: $('body').attr('data-base-url') + 'apply/getapplicationdetails', method: 'post', data: { su_edge_id: suedgeid } }).done(function (response) { var arrresponse = response.split('='); if (arrresponse[0] > 0) { $(".havesuEdage").hide(); $(".apply-form").show(); $("#step1").hide(); $("#step2").show(); $("#regis_id").val(arrresponse[0]); $("#name").val(arrresponse[2]); $("#email").val(arrresponse[3]); $("#mob").val(arrresponse[4]); $("#user_otp").val(arrresponse[16]); $("#address").val(arrresponse[5]); $("#city").val(arrresponse[6]); $("#state").val(arrresponse[7]); $("#pincode").val(arrresponse[8]); $('input:radio[name=gender][value=' + arrresponse[10] + ']').attr('checked', true); $('#dateofbirth').val(arrresponse[9]); var programme_id = arrresponse[11]; var discipline_id = arrresponse[12]; var course_id = arrresponse[13]; showProgrammeDiscipline(programme_id, discipline_id); showDisciplineCourse(programme_id, discipline_id, course_id); $('#programme option[value="' + programme_id + '"]').prop("selected", true); return false; } else if (arrresponse[0] == 0) { $("#step1").hide(); $("#step2").hide(); $("#step3").hide(); $("#step4").hide(); $("#step5").hide(); $(".havesuEdage").hide(); $(".apply-form").show(); $("#step6").show(); return false; } else { $(".havesuEdage").hide(); $(".apply-form").show(); $("#step1").show(); $("#regis_id").val(''); $("#name").val(''); $("#email").val(''); $("#mob").val(''); $("#step6").hide(); return false; } }); } return false; }); /* * Onclick step1 validate and check current status */ $("#globalform").on("click", function (e) { var name = $("#name").val(); var email = $("#email").val(); var country = $("#country").val(); var mobile = $("#mob").val(); var discipline = $("#discipline").val(); var programme = $("#programme").val(); var course = $("#course").val(); if (typeof name == 'undefined') { name = ''; } if (typeof mobile == 'undefined') { mobile = ''; } if (typeof email == 'undefined') { email = ''; } if (typeof country == 'undefined') { country = ''; } if (typeof discipline == 'undefined') { discipline = ''; } if (typeof programme == 'undefined') { programme = ''; } if (typeof course == 'undefined') { course = ''; } var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $("#name").parent().removeClass('has-error'); $("#country_div").parent().removeClass('has-error'); $("#mob").parent().removeClass('has-error'); $("#email").parent().removeClass('has-error'); $("#programme_div").parent().removeClass('has-error'); $("#course_div").parent().removeClass('has-error'); $("#discipline_div").parent().removeClass('has-error'); var error_flag = 'N'; if (name == '') { $("#name").parent().addClass("has-error"); error_flag = 'Y'; } if (email == '') { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (country == '') { $("#country_div").parent().addClass("has-error"); error_flag = 'Y'; } if (mobile == '') { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } if (programme == '') { $("#programme_div").parent().addClass("has-error"); error_flag = 'Y'; } if (discipline == '') { $("#discipline_div").parent().addClass("has-error"); error_flag = 'Y'; } if (course == '') { $("#course_div").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { return true; } return false; }); /* * Onclick step1 validate and check current status */ $("#sendverificationotp").on("click", function (e) { $('ul').removeClass('has-error'); var name = $("#name").val(); var email = $("#email").val(); var country = $("#country").val(); var mobile = $("#mob").val(); if (typeof name == 'undefined') { name = ''; } if (typeof mobile == 'undefined') { mobile = ''; } if (typeof email == 'undefined') { email = ''; } var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $("#name").parent().removeClass('has-error'); $("#country").parent().removeClass('has-error'); $("#mob").parent().removeClass('has-error'); $("#email").parent().removeClass('has-error'); $("#user_otp").parent().removeClass('has-error'); var error_flag = 'N'; if (name == '') { $("#name").parent().addClass("has-error"); error_flag = 'Y'; } if (country == '') { $("#country").parent().addClass("has-error"); error_flag = 'Y'; } if (email == '') { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (mobile == '') { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { $('.submit_info').show(); // Send OTP request to api to save the step1 data $.ajax({ url: $('body').attr('data-base-url') + 'apply/sendVerificationSMS', method: 'post', data: { name: name, email: email, mob: mobile, country: country } }).done(function (response) { $('.submit_info').hide(); $('#resend_otp').html(''); $('#resend_otp').html('<span id="resend_otp">Resend OTP</span>'); $("<p style='color:green;' id='msg_div'>OTP send successfully</p>").insertAfter("#submit_info"); setTimeout(function () { $('#msg_div').slideUp("slow"); }, 4000); return false; }) } return false; }); /* * Onclick step1 validate and check current status */ $(".step1").on("click", function (e) { var name = $("#name").val(); var email = $("#email").val(); var country = $("#country").val(); var mobile = $("#mob").val(); var user_otp = $("#user_otp").val(); if (typeof name == 'undefined') { name = ''; } if (typeof mobile == 'undefined') { mobile = ''; } if (typeof email == 'undefined') { email = ''; } var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $('ul').parent().removeClass('has-error'); $("#name").parent().removeClass('has-error'); $("#country").parent().removeClass('has-error'); $("#mob").parent().removeClass('has-error'); $("#email").parent().removeClass('has-error'); $("#user_otp").parent().removeClass('has-error'); var error_flag = 'N'; if (name == '') { $("#name").parent().addClass("has-error"); error_flag = 'Y'; } if (country == '') { $("#country").parent().addClass("has-error"); error_flag = 'Y'; } if (email == '') { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (email != '' && !emailReg.test(email)) { $("#email").parent().addClass("has-error"); error_flag = 'Y'; } if (mobile == '') { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } else if (!mobile.match('[0-9]{10}')) { $("#mob").parent().addClass("has-error"); error_flag = 'Y'; } if (user_otp == '') { $("#user_otp").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { $('.submit_info').show(); $("#divname_msg").remove() $("#divmobile_msg").remove() $("#divemail_msg").remove() // Send request to api to save the step1 data $.ajax({ url: $('body').attr('data-base-url') + 'apply/applyStepOne', method: 'post', data: { name: name, email: email, mob: mobile, user_otp: user_otp, country: country } }).done(function (response) { var responsevalue = response.split('='); $('.submit_info').hide(); if (responsevalue[0] > 0) { if (responsevalue[1] == 'SUCCESS') { $("#step1").hide(); $("#step2").hide(); $("#step3").hide(); $("#step4").hide(); $("#step5").hide(); $(".havesuEdage").hide(); $(".apply-form").show(); $("#step6").show(); return false; } else if (responsevalue[1] == 'FAIL') { $("#step1").hide(); $("#step2").show(); $("#regis_id").val(responsevalue[0]); $("#name").val(responsevalue[2]); $("#email").val(responsevalue[3]); $("#mob").val(responsevalue[4]); $("#address").val(responsevalue[5]); $("#user_otp").val(responsevalue[16]); $("#city").val(responsevalue[6]); $("#state").val(responsevalue[7]); $("#pincode").val(responsevalue[8]); $('input:radio[name=gender][value=' + responsevalue[10] + ']').attr('checked', true); $('#dateofbirth').val(responsevalue[9]); var programme_id = responsevalue[11]; var discipline_id = responsevalue[12]; var course_id = responsevalue[13]; showProgrammeDiscipline(programme_id, discipline_id); showDisciplineCourse(programme_id, discipline_id, course_id); $('#programme option[value="' + programme_id + '"]').prop("selected", true); return false; } else { $("#step1").hide(); $("#step2").show(); $("#regis_id").val(response); $("#applystep2").addClass('active'); $("#applystep2a").addClass('active'); return false; } } else if (responsevalue[0] == 'Invalid OTP') { $("<p style='color:red; font-size:11px;' id='msg_div'>Invalid OTP. Please Enter 6 Digit Valid OTP.</p>").insertAfter("#submit_info"); setTimeout(function () { $('#msg_div').slideUp("slow"); }, 4000); return false; } else { var obj = jQuery.parseJSON(response); if (obj.name) { $("<span style='color:red;' id='divname_msg'>" + obj.name + "</span>").insertAfter("#name"); } if (obj.mobile) { $("<span style='color:red;' id='divmobile_msg'>" + obj.mobile + "</span>").insertAfter("#mob"); } if (obj.email) { $("<span style='color:red;' id='divemail_msg'>" + obj.email + "</span>").insertAfter("#email"); } } return false; }) } return false; }); /* * Onclick step2 validation */ $(".step2").on("click", function (e) { var dob = $("#dateofbirth").val(); var gender = $('input:radio[name=gender]:checked').val(); var city = $("#city").val(); var state = $("#state").val(); var pincode = $("#pincode").val(); var address = $("#address").val(); var regis_id = $("#regis_id").val(); if (typeof dob == 'undefined') { dob = ''; } if (typeof gender == 'undefined') { gender = ''; } if (typeof city == 'undefined') { city = ''; } if (typeof state == 'undefined') { state = ''; } if (typeof pincode == 'undefined') { pincode = ''; } if (typeof address == 'undefined') { address = ''; } $("#dateofbirth").parent().removeClass('has-error'); $("#gender").parent().removeClass('has-error'); $("#address").parent().removeClass('has-error'); $("#city").parent().removeClass('has-error'); $("#state").parent().removeClass('has-error'); $("#pincode").parent().removeClass('has-error'); var error_flag = 'N'; if (dob == '') { $("#dateofbirth").parent().addClass("has-error"); error_flag = 'Y'; } if (gender == '') { $("#gender").parent().addClass("has-error"); error_flag = 'Y'; } if (address == '') { $("#address").parent().addClass("has-error"); error_flag = 'Y'; } if (city == '') { $("#city").parent().addClass("has-error"); error_flag = 'Y'; } if (state == '') { $("#state").parent().addClass("has-error"); error_flag = 'Y'; } if (pincode == '') { $("#pincode").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { $("#divdob_msg").remove() $("#divgender_msg").remove() $("#divaddress_msg").remove() $("#divcity_msg").remove() $("#divstate_msg").remove() $("#divpincode_msg").remove() // Send request to api to save the step1 data $.ajax({ url: $('body').attr('data-base-url') + 'apply/applyStepTwo', method: 'post', data: { regis_id: regis_id, dob: dob, gender: gender, address: address, city: city, state: state, pincode: pincode } }).done(function (response) { if (response > 0) { $("#step2").hide(); $("#step3").show(); $("#applystep3").addClass('active'); return false; } else { var obj = jQuery.parseJSON(response); if (obj.dob) { $("<span style='color:red;' id='divdob_msg'>" + obj.dob + "</span>").insertAfter("#dateofbirth"); } if (obj.gender) { $("<span style='color:red;' id='divgender_msg'>" + obj.gender + "</span>").insertAfter("#gender"); } if (obj.address) { $("<span style='color:red;' id='divaddress_msg'>" + obj.address + "</span>").insertAfter("#address"); } if (obj.city) { $("<span style='color:red;' id='divcity_msg'>" + obj.city + "</span>").insertAfter("#city"); } if (obj.state) { $("<span style='color:red;' id='divstate_msg'>" + obj.state + "</span>").insertAfter("#state"); } if (obj.pincode) { $("<span style='color:red;' id='divepincode_msg'>" + obj.pincode + "</span>").insertAfter("#pincode"); } } return false; }) } return false; }); /* * Onclick step3 validation */ $(".step3courseprogramme").on("click", function (e) { var programme = $("#programme").val(); var discipline = $("#discipline").val(); var course = $("#course").val(); var regis_id = $("#regis_id").val(); if (typeof programme == 'undefined') { programme = ''; } if (typeof discipline == 'undefined') { discipline = ''; } if (typeof course == 'undefined') { course = ''; } $(".programme").parent().removeClass('has-error'); $(".discipline").parent().removeClass('has-error'); $(".course").parent().removeClass('has-error'); var error_flag = 'N'; if (programme == '') { $(".programme").parent().addClass("has-error"); error_flag = 'Y'; } if (discipline == '') { $(".discipline").parent().addClass("has-error"); error_flag = 'Y'; } if (course == '') { $(".course").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'N') { $("#divProgramme_msg").remove() $("#divcourse_msg").remove() $("#divdiscipline_msg").remove() // Send request to api to save the step1 data $.ajax({ url: $('body').attr('data-base-url') + 'apply/applyStepThree', method: 'post', data: { program: programme, discipline: discipline, course: course, regis_id: regis_id } }).done(function (response) { if (response > 0) { $("#applystep4").addClass('active'); $("#step3").hide(); $("#step4").show(); return false; } else { var obj = jQuery.parseJSON(response); if (obj.programme) { $("<span style='color:red;' id='divprogramme_msg'>" + obj.programme + "</span>").insertAfter("#programme"); } if (obj.discipline) { $("<span style='color:red;' id='divdiscipline_msg'>" + obj.discipline + "</span>").insertAfter("#discipline"); } if (obj.course) { $("<span style='color:red;' id='divcourse_msg'>" + obj.course + "</span>").insertAfter("#mob"); } } }) return false; } }); }); // Perform onclick event for function showDiscipline(programme_value) { var programme_id = $('input:radio[name=programme_name]:checked').val(); $.ajax({ url: $('body').attr('data-base-url') + 'search/getProgrammeDiscipline', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('.search-programme').html(''); $('.search-programme').html(programme_value); $('#search_discipline').html(''); $('#search_discipline').html(response); $("#discipline-lnk").addClass('active'); $("#discipline").addClass('active'); $("#programme").removeClass('active'); $("#programme").addClass('selected'); $("#undergraduate-lnk").removeClass('active'); return false; }); } // Perform onclick event to populateCourse function populateCourse(discipline_value) { var programme_id = $('input:radio[name=programme_name]:checked').val(); var discipline = $('input:radio[name=discipline]:checked').val(); $.ajax({ url: $('body').attr('data-base-url') + 'search/getDisciplineCourse', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id, discipline: discipline } }).done(function (response) { $('.search-discipline').html(''); $('.search-discipline').html(discipline_value); $('#search_course').html(''); $('#search_course').html(response); $("#course").addClass('active'); $("#select-course-lnk").addClass('active'); $("#discipline-lnk").removeClass('active'); $("#discipline").removeClass('active'); $("#discipline").addClass('selected'); $("#programme").removeClass('active'); $("#undergraduate-lnk").removeClass('active'); return false; }); } // Show Department list function showDepartment(school_name) { var school_id = $('input:radio[name=school]:checked').val(); $.ajax({ url: $('body').attr('data-base-url') + 'search/getSchoolDeparements', method: 'post', data: { id: $(this).attr('data-src'), school_id: school_id } }).done(function (response) { $('#select_school').html(''); $('#select_school').html(school_name); $('#deparement-block').html(''); $('#deparement-block').html(response); $("#deparement-lnk").addClass('active'); //$("#department_div").addClass('active'); $("#school_div").addClass('active'); $("#school_div").addClass('selected'); $("#school-lnk").removeClass('active'); return false; }); } function AddReadMore() { //This limit you can set after how much characters you want to show Read More. var carLmt = 280; // Text to show when text is collapsed var readMoreTxt = " ... Read More <i class='icon-arrow-down-circle icons'></i>"; // Text to show when text is expanded var readLessTxt = " Read Less <i class='icon-arrow-up-circle icons'></i>"; //Traverse all selectors with this class and manupulate HTML part to show Read More $(".addReadMore").each(function () { if ($(this).find(".firstSec").length) return; var allstr = $(this).text(); if (allstr.length > carLmt) { var firstSet = allstr.substring(0, carLmt); var secdHalf = allstr.substring(carLmt, allstr.length); var strtoadd = firstSet + "<span class='SecSec'>" + secdHalf + "</span><span class='readMore' title='Click to Show More'>" + readMoreTxt + "</span><span class='readLess' title='Click to Show Less'>" + readLessTxt + "</span>"; $(this).html(strtoadd); } }); //Read More and Read Less Click Event binding $(document).on("click", ".readMore,.readLess", function () { $(this).closest(".addReadMore").toggleClass("showlesscontent showmorecontent"); }); } //Email Subscribe function checkEmailField() { var email_id = $("#subscribeEmail").val(); $("#subscribeEmail").removeClass('has-error'); var emailReg = /^[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}$/; $("#subscribeEmail_msg").remove() if (email_id == '') { $("#subscribeEmail").addClass('has-error'); $("<span style='color:red;' id='subscribeEmail_msg'>Please enter valid email id.</span>").insertAfter("#subscribe_div"); return false; } else { if (emailReg.test(email_id)) { $.ajax({ type: "POST", url: $('body').attr('data-base-url') + 'requestinfo/subscribedNow', data: { email_id: email_id }, success: function (data) { if (data > 0) { $("<span style='color:#fff;' id='subscribeEmail_msg'>You have subscribed for sharda university updates successfully.</span>").insertAfter("#subscribe_div"); $("#subscribeEmail").val(''); setTimeout(function () { $('#subscribeEmail_msg').slideUp("slow"); }, 8000); return false; } else if (data == 'Already subscribed') { $("<span style='color:red;' id='subscribeEmail_msg'>You have already subscribed for sharda university updates.</span>").insertAfter("#subscribe_div"); $("#subscribeEmail").val(''); setTimeout(function () { $('#subscribeEmail_msg').slideUp("slow"); }, 8000); return false; } else { $("<span style='color:red;' id='subscribeEmail_msg'>Invalid Request</span>").insertAfter("#subscribe_div"); setTimeout(function () { $('#subscribeEmail_msg').slideUp("slow"); }, 4000); return false; } } }); } else { $("#subscribeEmail").addClass('has-error'); $("<span style='color:red;' id='subscribeEmail_msg'>Please enter valid email id.</span>").insertAfter("#subscribe_div"); return false; } } return false; } function showProgrammeDiscipline(programme_id, discipline_id) { $.ajax({ url: $('body').attr('data-base-url') + 'apply/getProgrammeDiscipline', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id } }).done(function (response) { $('#discipline').html(''); $('#discipline').append($('<option>').text(' -- Select Discipline -- ').attr('value', '')); $.each(response, function (i, value) { $('#discipline').append($('<option>').text(value).attr('value', i)); if (value == discipline_id) { $('#discipline').append($('<option>').text('selected').attr('selected', i)); } }); }); } function showDisciplineCourse(programme_id, discipline_id, course_id) { $.ajax({ url: $('body').attr('data-base-url') + 'apply/getDisciplineCourse', method: 'post', data: { id: $(this).attr('data-src'), programme_id: programme_id, discipline_id: discipline_id } }).done(function (response) { $('#course').html(''); $('#course').append($('<option>').text(' -- Select Course -- ').attr('value', '')); $.each(response, function (i, value) { $('#course').append($('<option>').text(value).attr('value', i)); if (value == course_id) { $('#course').append($('<option>').text('selected').attr('selected', i)); } }); }); } /* * Function : validateglobalapplication */ function validateglobalapplication() { var dob = $("#datepicker").val(); var father_name = $("#father_name").val(); var mother_name = $("#mother_name").val(); var gender = $("#gender").val(); var passport_num = $("#passport_num").val(); var country = $("#country").val(); var address = $("#address").val(); var city = $("#city").val(); var sec_year = $("#sec_year").val(); var sec_result = $("#sec_result").val(); var sec_board = $("#sec_board").val(); var sec_school = $("#sec_school").val(); var sec_city = $("#sec_city").val(); var sec_country = $("#sec_country").val(); var sec_cgpa = $("#sec_cgpa").val(); var sec_file = $("#sec_file").val(); if (typeof dob == 'undefined') { dob = ''; } if (typeof father_name == 'undefined') { father_name = ''; } if (typeof mother_name == 'undefined') { mother_name = ''; } if (typeof gender == 'undefined') { gender = ''; } if (typeof passport_num == 'undefined') { passport_num = ''; } if (typeof country == 'undefined') { country = ''; } if (typeof address == 'undefined') { address = ''; } if (typeof city == 'undefined') { city = ''; } if (typeof sec_year == 'undefined') { sec_year = ''; } if (typeof sec_result == 'undefined') { sec_result = ''; } if (typeof sec_board == 'undefined') { sec_board = ''; } if (typeof sec_school == 'undefined') { sec_school = ''; } if (typeof sec_city == 'undefined') { sec_city = ''; } if (typeof sec_country == 'undefined') { sec_country = ''; } if (typeof sec_cgpa == 'undefined') { sec_cgpa = ''; } if (typeof sec_file == 'undefined') { sec_file = ''; } // Remove has-error class $("#datepicker").parent().removeClass('has-error'); $("#father_name").parent().removeClass('has-error'); $("#mother_name").parent().removeClass('has-error'); $("#gender_div").parent().removeClass('has-error'); $("#passport_num").parent().removeClass('has-error'); $("#country_div").parent().removeClass('has-error'); $("#address").parent().removeClass('has-error'); $("#city").parent().removeClass('has-error'); $("#sec_year").parent().removeClass('has-error'); $("#sec_result_div").parent().removeClass('has-error'); $("#sec_board").parent().removeClass('has-error'); $("#sec_school").parent().removeClass('has-error'); $("#sec_city").parent().removeClass('has-error'); $("#sec_country").parent().removeClass('has-error'); $("#sec_cgpa").parent().removeClass('has-error'); $("#sec_file_div").parent().removeClass('has-error'); var error_flag = 'N'; if (dob == '') { $("#datepicker").parent().addClass("has-error"); error_flag = 'Y'; $('#dob').focus(); } if (father_name == '') { $("#father_name").parent().addClass("has-error"); error_flag = 'Y'; $('#father_name').focus(); } if (mother_name == '') { $("#mother_name").parent().addClass("has-error"); error_flag = 'Y'; $('#mother_name').focus(); } if (gender == '') { $("#gender_div").parent().addClass("has-error"); error_flag = 'Y'; $('#gender').focus(); } if (passport_num == '') { $("#passport_num").parent().addClass("has-error"); error_flag = 'Y'; $('#passport_num').focus(); } if (country == '') { $("#country_div").parent().addClass("has-error"); error_flag = 'Y'; } if (address == '') { $("#address").parent().addClass("has-error"); error_flag = 'Y'; } if (city == '') { $("#city").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_year == '') { $("#sec_year").parent().addClass("has-error"); error_flag = 'Y'; $('#sec_year').focus(); } if (sec_result == '') { $("#sec_result_div").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_board == '') { $("#sec_board").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_school == '') { $("#sec_school").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_city == '') { $("#sec_city").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_country == '') { $("#sec_country").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_cgpa == '') { $("#sec_cgpa").parent().addClass("has-error"); error_flag = 'Y'; } if (sec_file == '') { $("#sec_file_div").parent().addClass("has-error"); error_flag = 'Y'; } if (error_flag == 'Y') { return false; } }