justinmind-logo
 
Upvote 1

Is there a way to get onChange event to fire as I type?

Answered Adam Diestelkamp 6 years ago

When I use onChange with a text input it appears it only fires when I blur the field. Is that what it's supposed to do? Or is there a way to fire that event as I type each character?


I'm using it to change the view based on what an email address contains, I want to be able to have the event occur before blur.

Replies (1)
photo
2

Hi Adam,


You should use an 'on key up' event instead of 'on change'.


Best,

Danielle

photo
1

Thanks! That should do the trick!

photo
Leave a Comment
 
Attach a file