About Submiting Asynchronous Forms
I’ve seen some websites having problems with browsers autocompletion functions recently and I thought I should write something about it. My browser simply would not recognize some asynchronous form submissions and would not save my password. Like everyone else, I love my autocomplete and I don’t like who don’t let me use it.
The problems with these forms were they used anchor elements or images as submission buttons, using some code like the one bellow:
Let’s look at this asynchronous form:
This is a really bad idea. We have semantically correct elements to submit the form, namely
<input type="submit">, which should be used in these situations. Using the correct elements throughout your webpage is important for both your browser and indexers, as Google, to understand correctly what you mean. CSS is always there to help you make them look exactly the way you want.
So please, when writing your forms, or any part of a web page for that matter, please use the correct semantic element to do what you want.