sadaf2605 sadaf2605 - 1 month ago 11
HTML Question

js form update while typing

I can update form using js, when user hits enter after something on a html form or when he

onclick
"submit" button, but I want it to update form while the user is typing something.

I know that I can do
Infinity loop
yet it is not a good idea or I can check after intervals but it will cause unnecessary checking what I don't want.

Answer

Use keyUp event handler with the input field contained within your form.

References: Javascript, jQuery

[UPDATE]

You missed round brackets at function definition, check the updated fiddle

Comments