搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Remember password dialog appear prior real form submitting

  • 無回覆
  • 3 有這個問題
  • 13 次檢視
more options

In case if we have form with password field on it and form validation performed by JS function attached to onSubmit event (<form onsubmit="return validateForm()">) FireFox displays "Remember Password" dialog when you try to submit the form regardless of validation result. So even if function validateForm returns false and form will not be actually submitted, remember password dialog will appear. The same thing with buttons on such form. For example: we have button to run some JS script on the form <button onclick="soSomething(); return false"> When button clicked, "Remember Password" dialog will appear, but form actually is not submitted.

In case if we have form with password field on it and form validation performed by JS function attached to onSubmit event (<form onsubmit="return validateForm()">) FireFox displays "Remember Password" dialog when you try to submit the form regardless of validation result. So even if function validateForm returns false and form will not be actually submitted, remember password dialog will appear. The same thing with buttons on such form. For example: we have button to run some JS script on the form <button onclick="soSomething(); return false"> When button clicked, "Remember Password" dialog will appear, but form actually is not submitted.