Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

Website with silly login form confuses username completion

  • 2 תגובות
  • 1 has this problem
  • 7 views
  • תגובה אחרונה מאת cor-el

more options

Hey!

The UK Met Office (UKMO) has a General Aviation (GA) service where they publish weather charts and such: https://www.metoffice.gov.uk/services/transport/aviation/regulated/aviation-briefing-service-guidance It's a free service, anyone can create an account.

The login page, however, has a slightly odd way of collecting the username and password: https://logon.metoffice.gov.uk/Login?goto=http://www.metoffice.gov.uk/premium/myservices/

On that page, there are two <form>s, each containing an <input> element, one for the username and one for the password. The login button is just some javascript which fills in a third, hidden form and POSTs it. Once I have logged in and Firefox has offered to save the password for me (I have to tell it my username because the forms confuse this step too), it never manages to complete both forms. It only autocompletes the password.

Is it possible for Firefox to learn how to cope with this form? I suspect convincing UKMO to fix their website is unlikely, and they're probably not the only offender...

Bruce

Hey! The UK Met Office (UKMO) has a General Aviation (GA) service where they publish weather charts and such: https://www.metoffice.gov.uk/services/transport/aviation/regulated/aviation-briefing-service-guidance It's a free service, anyone can create an account. The login page, however, has a slightly odd way of collecting the username and password: https://logon.metoffice.gov.uk/Login?goto=http://www.metoffice.gov.uk/premium/myservices/ On that page, there are two <form>s, each containing an <input> element, one for the username and one for the password. The login button is just some javascript which fills in a third, hidden form and POSTs it. Once I have logged in and Firefox has offered to save the password for me (I have to tell it my username because the forms confuse this step too), it never manages to complete both forms. It only autocompletes the password. Is it possible for Firefox to learn how to cope with this form? I suspect convincing UKMO to fix their website is unlikely, and they're probably not the only offender... Bruce

פתרון נבחר

I've edited the JavaScript in my above reply to make it more general where to inject the field.

  • document.querySelectorAll('form[onsubmit] input[type="text"]')[0].parentNode.appendChild(e);
Read this answer in context 👍 0

כל התגובות (2)

more options

A possible workaround is to add a hidden password field in the first form to make Firefox recognize it as a login form You can create a new bookmark and paste the JavaScript code in its Location field.

javascript:(function(){var e=document.createElement('input');e.hidden="true";e.type="password";document.querySelectorAll('form[onsubmit] input[type="text"]')[0].parentNode.appendChild(e);})()

The JavaScript code only copies the first element to the hidden Login form and ignores this extra input field, so there shouldn't be a problem.

  • frms = document.forms;i=1;frm=frms['frm' + i];frm.elements[0];

השתנתה ב־ על־ידי cor-el

more options

פתרון נבחר

I've edited the JavaScript in my above reply to make it more general where to inject the field.

  • document.querySelectorAll('form[onsubmit] input[type="text"]')[0].parentNode.appendChild(e);