I am doing a similar thing in my task to submit a button on "onchange" event, this things working in all browsers accept IE 6 & IE 7.
any help would be appreciated.
the element.onchange part is the reference to the onchange property of the element. This property is expected to be a reference to the change handler for the element (if any).
The function() { /*whatever */ } part is an inline anonymous function. We could also specify the name of an existing function here, but if there's no reason for the function to be declared separately and pollute the global namespace, it is preferred to use anonymous functions.