1
Guys, first a good day.
Well, I wonder if it is possible to create a handler in case a -td- is modified.
Example. I have the following code:
<table>
<tr>
<td>Olá</td>
</tr>
</table>
When td is modified, activate an event handler. I tried to use .on('change'), but it seems to only work for inputs, textarea, check boxes...
I wonder if someone could help me?
Grateful from now on!
Can’t you use the code that modifies the table? It changes to?
– Sergio
Thanks for the answer. Well, I’m trying to create a Tampermonkey script, which takes information from a table. I would need an event handler if it is modified. But I don’t know what to do. Thanks again.
– Isaque de Souza
But, as a table, which is a "fixed" structure, will suffer a manipulation? Table displays formatted data, is not used for manipulation. Explain better what you want.
– William Aparecido Brandino
The information in this table is updated dynamically when you click on a button. I’d like to take the second row of this table. Do you understand? Thanks in advance.
– Isaque de Souza
Maybe a way to keep seeing the value from time to time with a "timer" will work. Hence if the value is different from the previous one, that is to say changed, then triggers the desired action.
– Rodrigo Tognin
Can’t you get the information in the same process that updates the table? Type, click the button, refresh the table and send the same data to where you need it?
– Fleuquer Lima
Fleuquer, thanks for the answer. Well, I’m not the one who manages the system I’m scripting to, you know? Thanks in advance.
– Isaque de Souza
Rodrigo, thanks for the answer. Do you talk about using setInterval() for that? The idea seems good. I’ll try it here. Thanks in advance.
– Isaque de Souza