forked from .cyb/cyberman
Update 'public/js/admin_domains.js'
This commit is contained in:
parent
563c48d0da
commit
bf25528424
|
@ -1,14 +1,15 @@
|
|||
function updateOwnerEmail() {
|
||||
var name = this.domainName;
|
||||
document.getElementById("owneremail-"+name).innerHTML = this.responseText;
|
||||
}
|
||||
|
||||
function showOwnerEmail(name) {
|
||||
document.getElementById("owneremail-"+name).innerHTML = "Loading...";
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
req.domainName = name;
|
||||
req.addEventListener("load", updateOwnerEmail);
|
||||
req.open("GET", "/api/get_owner_email?name="+encodeURIComponent(name));
|
||||
req.send();
|
||||
}
|
||||
function showOwnerEmail(in_name) {
|
||||
let name = in_name;
|
||||
if (!document.getElementById('owneremail-' + name)) {
|
||||
return;
|
||||
}
|
||||
document.getElementById('owneremail-' + name).innerHTML = 'Loading...';
|
||||
fetch('/api/get_owner_email?name=' + encodeURIComponent(name), {
|
||||
method: 'GET',
|
||||
mode: 'cors'
|
||||
}).then(g => g.text()).then(g => {
|
||||
document.getElementById('owneremail-' + name).innerHTML = g;
|
||||
}).catch((e) => {
|
||||
console.log('server error', e);
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue