I need to know if any of the elements in a form has changed with out putting an onchange on each element. Does anyone know a way to easily know if any of the data in the form has changed? This form has lots & lots of input fields.
@AdamGundrySep 02.2004 — #Welcome to the forums. You will need to assign an onchange event handler to each field, but you can do it dynamically thus: <script type="text/javascript"> var somethingChanged = false;
function reportChange(){ somethingChanged = true; }
window.onload = function(){ for (var i=0;i<document.forms[0].length;i++) document.forms[0][i].onchange = reportChange; } </script> Adam