Vote - Browse Schools by City
⭐ Vote for the Best Pre Schools In India ⭐
| Sl .No |
School Name |
Principal Name |
City |
|
| 1 |
Acharya Mahashraman Terapanth Jain Public School |
Principal |
Chennai |
|
| 2 |
Alpha International School |
Principal |
Chennai |
|
| 3 |
Alpha Matriculation Higher Secondary School |
Principal |
Chennai |
|
| 4 |
Alpha School, CIT Nagar |
Principal |
Chennai |
|
| 5 |
Knowledge Academy School |
Principal |
Chennai |
|
| 6 |
Little Flower Matriculation Higher Secondary School |
Principal |
Chennai |
|
| 7 |
Madras Christian College Higher Secondary School |
Principal |
Chennai |
|
| 8 |
MCC Public School |
Principal |
Chennai |
|
| 9 |
St. John's Public School |
Principal |
Chennai |
|
| 10 |
TI School |
Principal |
Chennai |
|
document.addEventListener('DOMContentLoaded', function () {
var voteForm = document.querySelector('#voteModal form');
var otpForm = document.querySelector('#otpModal form');
var tempFormData = null;
voteForm.addEventListener('submit', function (e) {
e.preventDefault();
tempFormData = new FormData(voteForm);
fetch("https://sakurarobotics.com/send-otp", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': 'OPlgvmQA8VhTFbdjIPIAQkn4wn0MTL5eNfTI0rhC'
},
body: JSON.stringify({
mobile: tempFormData.get('mobile'),
school_id: tempFormData.get('school_id'),
category: 'ipj-awards'
})
})
.then(async response => {
const contentType = response.headers.get("content-type");
if (contentType && contentType.includes("application/json")) {
const data = await response.json();
if (data.message) {
var voteModal = bootstrap.Modal.getInstance(document.getElementById('voteModal'));
voteModal.hide();
var otpModal = new bootstrap.Modal(document.getElementById('otpModal'));
document.getElementById('otpMobile').value = tempFormData.get('mobile');
otpModal.show();
} else if (data.error) {
var voteModal = bootstrap.Modal.getInstance(document.getElementById('voteModal'));
voteModal.hide();
var messageModal = new bootstrap.Modal(document.getElementById('messageModal'));
document.getElementById('messageModalBody').innerHTML = `
${data.error}
`;
messageModal.show();
}
} else {
console.error('Received non-JSON response.');
}
})
.catch(error => {
console.error('Error sending OTP:', error);
});
});
otpForm.addEventListener('submit', function (e) {
e.preventDefault();
var otp = document.getElementById('otp').value;
fetch("https://sakurarobotics.com/verify-otp", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': 'OPlgvmQA8VhTFbdjIPIAQkn4wn0MTL5eNfTI0rhC'
},
body: JSON.stringify({
mobile: tempFormData.get('mobile'),
otp: otp,
name: tempFormData.get('name'),
email: tempFormData.get('email'),
address: tempFormData.get('address'),
school_id: tempFormData.get('school_id')
})
})
.then(response => response.json())
.then(data => {
var otpModal = bootstrap.Modal.getInstance(document.getElementById('otpModal'));
otpModal.hide();
var messageModal = new bootstrap.Modal(document.getElementById('messageModal'));
var messageModalBody = document.getElementById('messageModalBody');
if (data.message) {
messageModalBody.innerHTML = `
${data.message}
`;
messageModal.show();
// Close after 2 seconds and reload
setTimeout(function () {
messageModal.hide();
location.reload();
}, 2000);
} else if (data.error) {
messageModalBody.innerHTML = `
${data.error}
`;
messageModal.show();
}
})
.catch(error => {
console.error('Error verifying OTP:', error);
});
});
document.querySelectorAll('.vote-btn').forEach(button => {
button.addEventListener('click', function () {
document.getElementById('modalSchoolId').value = this.getAttribute('data-school-id');
document.getElementById('schoolNamePlaceholder').textContent = this.getAttribute('data-school-name');
});
});
});