Passport Tracking
<div style="max-width: 400px; margin: 40px auto; padding: 30px; border: 1px solid #e2e8f0; border-radius: 8px; font-family: Arial, sans-serif; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05);">
<h3 style="text-align: center; color: #1e293b; margin-top: 0;">Track Application Status</h3>
<p style="text-align: center; color: #64748b; font-size: 14px; margin-bottom: 20px;">Enter your tracking number below.</p>
<label style="display: block; margin-bottom: 8px; color: #334155; font-weight: bold; font-size: 14px;">Tracking Number</label>
<input type="text" id="receiptNum" placeholder="e.g., 91101012345" maxlength="11" style="width: 100%; box-sizing: border-box; padding: 10px; margin-bottom: 20px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 16px;" required>
<button onclick="checkStatus()" id="submitBtn" style="width: 100%; padding: 12px; background-color: #0073aa; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; transition: background 0.3s;">Check Status</button>
<div id="statusResult" style="margin-top: 20px; padding: 15px; text-align: center; font-weight: bold; border-radius: 4px; display: none;"></div>
</div>
<script>
function checkStatus() {
// .trim() removes any accidental spaces
var receipt = document.getElementById('receiptNum').value.trim();
var resultDiv = document.getElementById('statusResult');
var btn = document.getElementById('submitBtn');
// RULE 1: Check if field is empty
if(!receipt) {
alert("Please enter your Token Number.");
return;
}
// RULE 2 & 3: Exactly 11 digits, starts with 91101, only numbers
var isOnlyNumbers = /^\d+$/.test(receipt);
if (receipt.length !== 11 || !receipt.startsWith("91101") || !isOnlyNumbers) {
alert("Tracking number is incorrect. Please enter a valid 11-digit number starting with 91101.");
return;
}
// Show loading state
btn.innerText = "Checking...";
btn.disabled = true;
btn.style.backgroundColor = "#94a3b8";
resultDiv.style.display = "none";
// PASTE YOUR GOOGLE WEB APP URL BELOW
var scriptURL = "https://script.google.com/macros/s/AKfycbzBLkaFZL6zAvsL0gbfcpdq3m4K0yKyzxvRMEsXvZ3LRn01m-ACqVhMQXwhShFi4TINkQ/exec";
var fetchURL = scriptURL + "?receipt=" + encodeURIComponent(receipt);
fetch(fetchURL)
.then(response => response.json())
.then(data => {
resultDiv.innerText = "Current Status: " + data.status;
resultDiv.style.display = "block";
resultDiv.style.backgroundColor = "#f0fdf4";
resultDiv.style.color = "#166534";
resultDiv.style.border = "1px solid #bbf7d0";
// Reset button
btn.innerText = "Check Status";
btn.disabled = false;
btn.style.backgroundColor = "#0073aa";
})
.catch(error => {
resultDiv.innerText = "System error. Please try again later.";
resultDiv.style.display = "block";
resultDiv.style.backgroundColor = "#fef2f2";
resultDiv.style.color = "#991b1b";
resultDiv.style.border = "1px solid #fecaca";
// Reset button
btn.innerText = "Check Status";
btn.disabled = false;
btn.style.backgroundColor = "#0073aa";
});
}
</script>
Please Bring Your Original Token Receipt and Original Passport
during Consular Visiting hours (10:00 – 12:30)