Validator wywołuje makeRequest dla pola nazwa1 i nazwa2
function makeRequest(type, outputDiv, id) { if(id.value=='') { reponse('Pole nie może być puste', outputDiv); } else { url = 'return.php?id='+id.value+'&type='+type; advAJAX.get({ url: url, onSuccess : function(obj){}, onError : function(obj){}, onFinalization : function(obj) {return 'smok';} }); } } function reponse(text, outputDiv) { so_clearInnerHTML(document.getElementById(outputDiv)); eDIV = document.createElement("div"); eDIV.setAttribute("id","repon"); eDIV.appendChild(document.createTextNode(text)); document.getElementById(outputDiv).appendChild(eDIV); } function so_clearInnerHTML(obj) { while(obj.firstChild) obj.removeChild(obj.firstChild); }
Tutaj akurat zastowałem advAjax, ale próbowałem także mootools i podobnie nie potrafie zwrócić lub true...