Fix - scope variable to function only (#7935)

This commit is contained in:
frytimo
2026-04-29 16:49:01 +00:00
committed by GitHub
parent f4a5a16ca9
commit 6ccb7cd16c
+2 -1
View File
@@ -1677,6 +1677,7 @@
{*//domain selector *} {*//domain selector *}
function search_domains(element_id) { function search_domains(element_id) {
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
var obj, domain_uuid, domain_name, link_label;
xhttp.onreadystatechange = function() { xhttp.onreadystatechange = function() {
//if (this.readyState == 4 && this.status == 200) { //if (this.readyState == 4 && this.status == 200) {
// document.getElementById(element_id).innerHTML = this.responseText; // document.getElementById(element_id).innerHTML = this.responseText;
@@ -1750,7 +1751,7 @@
} }
} }
}; };
search = document.getElementById('domains_search'); var search = document.getElementById('domains_search');
if (search.value) { if (search.value) {
//xhttp.open("GET", "/core/domains/domain_list.php?search="+search.value, true); //xhttp.open("GET", "/core/domains/domain_list.php?search="+search.value, true);
xhttp.open("GET", "/core/domains/domain_json.php?search="+search.value+"&{$domain_json_token_name}={$domain_json_token_hash}", true); xhttp.open("GET", "/core/domains/domain_json.php?search="+search.value+"&{$domain_json_token_name}={$domain_json_token_hash}", true);