15
+Years of Experience₹ 1200
Consultation Fees35000 +
Patients Treated
Mon to Sat: 09 am to 02 pm
Request A Callback
Our dedicated team delivers advanced diagnostic services, expert surgical care, and round-the-clock emergency support to ensure comprehensive patient care and exceptional medical care.
Get treated with our cashless facilities, making it easy to avail your Mediclaim and insurance benefits. Wockhardt Hospitals, is partnered with 40+ insurance companies for seamless healthcare access.
To find the exact location of Wockhardt Hospitals in Rajkot for consultation, please click here or use
// Counter Section
const counterElement = document.getElementById('counter');
const targetValue = 1200;
const duration = 3000;
let startValue = 0;
let step = (targetValue - startValue) / duration * 10;
function updateCounter() {
startValue += step;
counterElement.textContent = Math.ceil(startValue);
}
const animationInterval = setInterval(updateCounter, 10);
setTimeout(() => {
clearInterval(animationInterval);
counterElement.textContent = targetValue;
}, duration);
const counterElement1 = document.getElementById('counter1');
const targetValue1 = 15;
const duration1 = 3000;
let startValue1 = 0;
let step1 = (targetValue1 - startValue1) / duration1 * 10;
function updateCounter1() {
startValue1 += step1;
counterElement1.textContent = Math.ceil(startValue1);
}
const animationInterval1 = setInterval(updateCounter1, 10);
setTimeout(() => {
clearInterval(animationInterval1);
counterElement1.textContent = targetValue1;
}, duration1);
const counterElement2 = document.getElementById('counter2');
const targetValue2 = 35000;
const duration2 = 3000;
let startValue2 = 0;
let step2 = (targetValue2 - startValue2) / duration2 * 10;
function updateCounter2() {
startValue2 += step2;
counterElement2.textContent = Math.ceil(startValue2);
}
const animationInterval2 = setInterval(updateCounter2, 10);
setTimeout(() => {
clearInterval(animationInterval2);
counterElement2.textContent = targetValue2;
}, duration2);
// =======================
// OTP VERIFICATION LOGIC
// =======================
function initCallbackOtp() {
const mobileInput = document.getElementById('cf_mobile');
const sendOtpBtn = document.getElementById('sendOtpBtn');
const otpWrapper = document.getElementById('otpWrapper');
const otpInput = document.getElementById('cf_otp');
const otpStatusIcon = document.getElementById('otpStatusIcon');
const otpStatus = document.getElementById('otpStatus');
const submitBtn = document.getElementById('callbackSubmitBtn');
const mobileError = document.getElementById('mobileError');
let otpVerified = false;
let verifyInFlight = false;
let currentNonce = (typeof CF7OTP !== 'undefined') ? CF7OTP.nonce : null;
if (!sendOtpBtn) return; // form not on this page
// The nonce baked into the page HTML can go stale if the page is served
// from a cache (common for logged-out/incognito visitors). Fetch a fresh
// one as soon as the page loads so we're not relying on a cached value.
function refreshNonce() {
if (typeof CF7OTP === 'undefined') return Promise.resolve(null);
return fetch(CF7OTP.refresh_nonce_url, { credentials: 'same-origin' })
.then(r => r.json())
.then(data => {
if (data && data.nonce) currentNonce = data.nonce;
return currentNonce;
})
.catch(() => currentNonce);
}
refreshNonce();
function setIcon(state) {
otpStatusIcon.className = 'otp-status-icon' + (state ? ' show ' + state : '');
if (state === 'success') otpStatusIcon.innerText = '✓';
else if (state === 'error') otpStatusIcon.innerText = '✕';
else otpStatusIcon.innerText = '';
}
function doSendOtp() {
const mobile = mobileInput.value.trim();
if (mobile === '') {
mobileError.textContent = 'Please enter your mobile number.';
mobileError.style.display = 'block';
mobileInput.focus();
return;
}
if (!/^[0-9]{10}$/.test(mobile)) {
mobileError.textContent = 'Exactly 10 digits required';
mobileError.style.display = 'block';
mobileInput.focus();
return;
}
if (typeof CF7OTP === 'undefined') {
sendOtpBtn.disabled = true;
sendOtpBtn.innerText = 'Loading...';
let attempts = 0;
const waitForOtp = setInterval(function () {
attempts++;
if (typeof CF7OTP !== 'undefined') {
clearInterval(waitForOtp);
sendOtpBtn.disabled = false;
sendOtpBtn.innerText = 'Send OTP';
currentNonce = CF7OTP.nonce;
refreshNonce().then(doSendOtp);
} else if (attempts > 40) {
clearInterval(waitForOtp);
sendOtpBtn.disabled = false;
sendOtpBtn.innerText = 'Send OTP';
mobileError.textContent = 'OTP service is still loading. Please try again in a moment.';
mobileError.style.display = 'block';
}
}, 250);
return;
}
mobileError.style.display = 'none';
sendOtpBtn.disabled = true;
sendOtpBtn.innerText = 'Sending...';
setIcon('');
otpStatus.innerText = '';
otpInput.value = '';
fetch(CF7OTP.send_url, {
method: 'POST',
credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ mobile: mobile, nonce: currentNonce || CF7OTP.nonce })
})
.then(r => r.json())
.then(data => {
if (data.code === 'bad_nonce') {
// Stale nonce (likely a cached page) - refresh once and retry automatically.
refreshNonce().then(function () {
sendOtpBtn.innerText = 'Send OTP';
doSendOtp();
});
return;
}
sendOtpBtn.disabled = false;
sendOtpBtn.innerText = 'Resend OTP';
if (data.status === 'sent') {
otpStatus.style.color = 'green';
otpStatus.innerText = 'OTP sent to your mobile.';
otpWrapper.style.display = 'block';
otpInput.focus();
} else {
otpStatus.style.color = 'red';
otpStatus.innerText = data.message || 'Failed to send OTP.';
}
})
.catch(() => {
sendOtpBtn.disabled = false;
sendOtpBtn.innerText = 'Send OTP';
otpStatus.style.color = 'red';
otpStatus.innerText = 'Something went wrong. Try again.';
});
}
function doVerifyOtp() {
const mobile = mobileInput.value.trim();
const otp = otpInput.value.trim();
if (otp.length !== 4 || verifyInFlight || typeof CF7OTP === 'undefined') return;
verifyInFlight = true;
setIcon('loading');
otpStatus.innerText = '';
otpInput.disabled = true;
fetch(CF7OTP.verify_url, {
method: 'POST',
credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ mobile: mobile, otp: otp, nonce: currentNonce || CF7OTP.nonce })
})
.then(r => r.json())
.then(data => {
if (data.code === 'bad_nonce') {
// Stale nonce - refresh once and retry automatically.
refreshNonce().then(function () {
verifyInFlight = false;
otpInput.disabled = false;
doVerifyOtp();
});
return;
}
verifyInFlight = false;
if (data.status === 'success') {
otpVerified = true;
setIcon('success');
otpStatus.style.color = 'green';
otpStatus.innerText = 'Mobile verified!';
submitBtn.disabled = false;
mobileInput.readOnly = true;
sendOtpBtn.disabled = true;
otpInput.disabled = true;
} else {
setIcon('error');
otpStatus.style.color = 'red';
otpStatus.innerText = data.message || 'Incorrect OTP.';
otpInput.disabled = false;
otpInput.value = '';
otpInput.focus();
}
})
.catch(() => {
verifyInFlight = false;
setIcon('error');
otpStatus.style.color = 'red';
otpStatus.innerText = 'Something went wrong. Try again.';
otpInput.disabled = false;
});
}
sendOtpBtn.addEventListener('click', doSendOtp);
// Auto-verify: digits only, and fire the moment 4 digits are entered
otpInput.addEventListener('input', function () {
this.value = this.value.replace(/\D/g, '').substring(0, 4);
setIcon('');
if (this.value.length === 4) {
doVerifyOtp();
}
});
// If they edit the mobile number after verifying, force re-verification
mobileInput.addEventListener('input', function () {
if (otpVerified) {
otpVerified = false;
submitBtn.disabled = true;
mobileInput.readOnly = false;
otpWrapper.style.display = 'none';
otpInput.value = '';
setIcon('');
otpStatus.innerText = '';
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initCallbackOtp);
} else {
initCallbackOtp();
}
// Enhanced client-side validation
var callbackSubmitting = false;
document.getElementById('callbackForm').addEventListener('submit', function(e) {
let valid = true;
const form = this;
const nameInput = form.querySelector('input[name="name"]');
const mobileInput = form.querySelector('input[name="mobile"]');
const nameError = document.getElementById('nameError');
const mobileError = document.getElementById('mobileError');
const submitBtn = document.getElementById('callbackSubmitBtn');
const loader = document.getElementById('callbackLoader');
if (callbackSubmitting) {
e.preventDefault();
return false;
}
nameError.style.display = 'none';
mobileError.style.display = 'none';
const namePattern = /^[a-zA-Z ]{1,80}$/;
if (!namePattern.test(nameInput.value.trim())) {
nameError.style.display = 'block';
valid = false;
}
const mobilePattern = /^[0-9]{10}$/;
if (!mobilePattern.test(mobileInput.value.trim())) {
mobileError.style.display = 'block';
valid = false;
}
if (submitBtn.disabled) {
// OTP not verified yet
valid = false;
}
if (!valid) {
e.preventDefault();
loader.style.display = 'none';
callbackSubmitting = false;
return false;
}
callbackSubmitting = true;
submitBtn.disabled = true;
submitBtn.innerText = 'Submitting...';
loader.style.display = 'block';
});
// Input filters to prevent invalid characters
document.querySelector('input[name="name"]').addEventListener('input', function(e) {
this.value = this.value.replace(/[^a-zA-Z ]/g, '');
});
document.querySelector('input[name="mobile"]').addEventListener('input', function(e) {
this.value = this.value.replace(/\D/g, '').substring(0, 10);
});
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
this.classList.toggle("active");
var panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.style.display = "none";
} else {
panel.style.display = "block";
}
});
}
setTimeout(function() {
var script = document.createElement('script');
script.src = "https://www.kenyt.ai/botapp/ChatbotUI/dist/js/bot-loader.js";
script.type = "text/javascript";
script.setAttribute("data-bot", "51947758");
document.head.appendChild(script);
}, 5000);