The code provided here is almost perfect in terms of functionality.
function post_form() {
http=new XMLHttpRequest();
http.onreadystatechange=function() {
if (http.readyState==4 && http.status==200) some_div.innerHTML=http.responseText;
};
http.open("POST", some_action_url, false);
http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
http.send(my_form_query(some_form_element));
}
Everything works as expected, but there's a minor inconvenience. When the client reloads the page, they need to re-enter their name because the browser doesn't auto-complete the form fields.
Therefore, my query is how can I enable web browsers to remember form fields that are not submitted in a conventional manner?