Fix hasOwnProperty
This commit is contained in:
parent
123d80bdb8
commit
bd8378159f
@ -17,8 +17,10 @@ function callRequest(action, section, message) {
|
||||
|
||||
var buttons = document.querySelectorAll('#' + section + ' button');
|
||||
for (var button in buttons) {
|
||||
if (buttons.hasOwnProperty(button)) {
|
||||
buttons[button].disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'ajax.php');
|
||||
@ -39,8 +41,10 @@ function callRequest(action, section, message) {
|
||||
}
|
||||
|
||||
for (var button in buttons) {
|
||||
if (buttons.hasOwnProperty(button)) {
|
||||
buttons[button].disabled = false;
|
||||
}
|
||||
}
|
||||
document.querySelector('#' + section + ' input').value = '';
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user