Hello,

I am trying to create a T5 version of
http://java.sun.com/developer/technicalArticles/J2EE/AJAX/

How should a url look like to be T5-ish in this javascript function:

function validate() {
   var idField = document.getElementById("userid");
   var url = "validate?id=" + encodeURIComponent(idField.value);
   if (typeof XMLHttpRequest != "undefined") {
       req = new XMLHttpRequest();
   } else if (window.ActiveXObject) {
       req = new ActiveXObject("Microsoft.XMLHTTP");
   }
   req.open("GET", url, true);
   req.onreadystatechange = callback;
   req.send(null);
}

and how should a method in my page responsible for handling the ajax request
look like?

Thanks,
Borut

Reply via email to