views:

28

answers:

1

I am developing a firefox addon and I want it to add an event listener on every form field. How would I implement this.

A: 
// 'extension is loaded', you probably have this
window.addEventListener("load", function() {
    // run your_function() when page is loaded and DOM is ready
    gBrowser.addEventListener("DOMContentLoaded", your_function, true);
}, false);
parserr
thanks. I tried the code in the javascript shell and it seems to work
tmim