It's not hated so much as misleading. AJAX stands for Asynchronous Javascript And XML. However, many scripts labelled "AJAX" (like the "AJAX Content" script here on DD) are neither asynchronous nor XML-based.Certainly. Don't use innerHTML as the start of djr33's script suggested he was about to do, though: this will erase the contents of all existing elements in the form, as well as wiping out their event handlers. Instead, use the DOM methods:
Code:
function addDivToForm(frm) {
var d = document.createElement("div");
d.style.border = "3px solid red";
frm.appendChild(d);
}