Skip to content Skip to sidebar Skip to footer

How Can I Find What Onchange Function An Element Has?

I have a page which loads a lot of JavaScript files. Somewhere in the files, an onchange handler is added to an inputfield A. When a value is added into inputfield A, inputfield B

Solution 1:

you can see the jquery expression in firebug DOM inspector using firequery in firefox https://addons.mozilla.org/en-us/firefox/addon/firequery/

Solution 2:

Chrome has build in developer tools that allow you to inspect an element and see any event listeners attached to it.

Google chrome developer tools really are amazing. http://code.google.com/chrome/devtools/docs/elements.html

Solution 3:

You can use Firebug to set a breakpoint when a particular HTML element has an attribute change:

http://getfirebug.com/doc/breakpoints/demo.html#html

You could try selecting the second element you've described (that gets filled in) and see if that works for you.

Solution 4:

Visual Events allows you to inspect the bound events without editing your code:

http://www.sprymedia.co.uk/article/Visual+Event

Solution 5:

I had the same issue and I used Google Chrome's dev tool and it helped. Follow the steps below:

  1. Select the event listener breakpoint

  2. Select control checkbox

  3. Select onChange this will pause on the onChange function in your code

Post a Comment for "How Can I Find What Onchange Function An Element Has?"