Event-driven form response handling in the browser