Attaching the hook onto submit should work for all browsers? You may not need $('#edit-next') above.