I’m trying to understand how this login page works by looking at the source from my browser (Chrome).
The source links to some CSS, pictures, and generic JavaScript libraries. Apart from a little jQuery at the very start (for changing the language), I don’t see why the page isn’t more than just dead HTML elements.
For example, if I click “LOGIN” with an empty username and password, the message “The username or password you entered is incorrect.” appears. But I can’t see anywhere in source where such behaviour is defined.
What am I missing?
The activity you are observing is one of the core functions of
<form>elements. When aformis submitted, the user’s browser is directed to the page defined by theactionattribute in the form. In addition to directing the user to this page, all of theinputs included in the form are passed to the web server as variables.One way of submitting a form is by including an
inputelement of typesubmitwithin the form, which is what the web designer has done here. When thatsubmitelement is invoked (via a click, for example), the form is submitted.