I have attached an event to a text box using addEventListener
. It works fine. My problem arouse when I wanted to trigger the event programmatically from another function.
How can I do it?
I have attached an event to a text box using How can I do it? |
||||
|
You can use fireEvent on IE, and w3c's dispatchEvent on most other browsers. To create the event you want to fire, you can use either Here is a self-explanatory piece of code (from prototype) that fires an event
|
|||||||||||||||
|
You can use jquery to trigger a event programmatically. for more details see http://api.jquery.com/trigger/ |
|||||||||||||||
|
I am using the following functions to do my task. It works fine when cursor moves away from textbox but if i want to fire the same event from code say like next function i get error...
|
|||||
|
A jQuery plugin that fire real JavaScript events https://github.com/FGRibreau/jQuery-plugin-fireEvent |
|||||
|