Update 'public/js/domain_check.js'
This commit is contained in:
parent
26b4e6c40f
commit
563c48d0da
|
@ -2,7 +2,7 @@ function checkAvailability() {
|
||||||
let name = document.getElementById('name').value;
|
let name = document.getElementById('name').value;
|
||||||
if (name === '') {
|
if (name === '') {
|
||||||
document.getElementById('avail').innerHTML = '';
|
document.getElementById('avail').innerHTML = '';
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
document.getElementById('avail').innerHTML = 'Checking availability...';
|
document.getElementById('avail').innerHTML = 'Checking availability...';
|
||||||
fetch('/api/check_availability?name=' + encodeURIComponent(name), {
|
fetch('/api/check_availability?name=' + encodeURIComponent(name), {
|
||||||
|
@ -15,6 +15,6 @@ function checkAvailability() {
|
||||||
document.getElementById('avail').innerHTML = 'Not available';
|
document.getElementById('avail').innerHTML = 'Not available';
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
document.getElementById('avail').innerHTML = 'Not available';
|
document.getElementById('avail').innerHTML = 'Server error';
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue