For example, there is an input field. Each time a user enters a key in this field, he sends an AJAX request with any text at the moment and does something with it. I learned the change and keyup functions in jQuery, but when I try to use them in Jsfiddle, they do nothing. Is there a standard way to do this kind of operation? I know its general for validation and so on.
<form> <input id="test" type='text' > <input type="submit" value="asdf"> </form> $('input').on("change",(function(e){ alert("Hello"); });
The effect I'm going to is like this game www.sporcle.com/games/g/nflteams#
You can enter any text and, if it is within the set of correct answers, then the table will be updated to show this answer. You will never have to obey. Do you think that they have achieved this effect?
It seemed to me that they should query the database every time the user enters a key to make sure that this is the correct answer. If they update the table to display the answer. What are other ways to do this?
source share