var xmlHttp;
function RefreshORP(eventTarget, eventArgument)
{
xmlHttp = GetXmlHttpObject();
if(xmlHttp == null)
{
return true;
}
xmlHttp.onreadystatechange = StateChanged;
var params = GetFormParam(eventTarget,eventArgument);
xmlHttp.open("POST","/contact.jsp",true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("ajaxcall", "true");
xmlHttp.send(params);
}
views:
69answers:
2
+6
A:
In jQuery you have it all done...
$.post("/contact.jsp", $("formID").serialize(), function(data){
// process callback
});
jQuery will also set all appropriate (and somehow standardized) request headers.
Robert Koritnik
2009-09-17 13:59:15