Answer the question
In order to leave comments, you need to log in
How to catch an input change caused by a script?
Greetings!
Some script, by condition, changes input.value
. I hang the listener on this one input
, but with a new change by the script, the listener does not react. At the same time, the same listener reacts if you change it input.value
manually (enter a value or click on the arrows in input
).
How to catch similar changes in input?
input.addEventListener("change", () => console.log(1));
Answer the question
In order to leave comments, you need to log in
The following actions helped:
1 Administration-file upload-file system specify the path
/var/snap/rocketchat-server/common/upload(in your case it is a little different)
sudo su
cd /var/snap/rocketchat-server/common/
chmod -R 777 upload
It's even easier for me - the "URL-address of the site" was written incorrectly in the general settings. Everything worked except downloading files.
ps Here's what I found - when the server is restarted, this setting is reset to http and downloads stop working.
Also, it is worth checking the proxy settings on Nginx.
By default, Nginx has a 1MB file upload limit. Correct the client_max_body_size directive, which is part of the Nginx ngx_http_core_module module.
https://www.tecmint.com/limit-file-upload-size-in-...
https://www.w3.org/TR/html4/interact/scripts.html
onchange = script [CT]
The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA.
element.onchange();
if ("createEvent" in document) {
var evt = document.createEvent("HTMLEvents");
evt.initEvent("change", false, true);
element.dispatchEvent(evt);
}
else
element.fireEvent("onchange");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question