I'm a newbie JS programmer, just trying to do some automation here and there with extensions like Greasemonkey/Tampermonkey/Violentmonkey. I ran into a wall that I can't find a solution, already tried to search for it for days and still can't figure it out.
The problem is this: there's page buttons (like a book), it can to go back, forward, and set a number to skip to X that page. I can click on both back and forward with no problem. My only issue is making use of the input box (not sure if that's how it's called).
The box works like this: you set any number inside and press ENTER (only way to confirm/submit the value change) and them it'll skip to that page if the page exists. One weird thing for me is that I tried changing it manually from 1 (default) to 3, them setting to 2 on script (with x.value) and when I confirm it manually, it goes to page 3 and not page 2 (even though it's showing 2 on UI and also on .value). So I though at least the value set I got, but it seems that even that I couldn't make.
Also changing the value="1" on DevTools to anything else doesn't change the UI and also don't register the input change, since when I press enter it just ignore my value.
This is the HTML shown on DevTools of the input box:
<input class="number" value="1" style="width: 40px; height: 40px; text-align: center;">
I'm not using jQuery (simply because I don't know how to use it), but if it's necessary I can learn!
Screen of the HTML structure on DevTools
Console.log with some info about the element I could search online
I don't know anything else I could provide to help further assistance. If there's anything, please let me know and thank you for helping!
With @wOxxOm's solution I was able to do it! All it needed was his solution (see comments) to change the inside value of the textbox and them a el.dispatchEvent with enter on it's key made the submit work!