AnsweredAssumed Answered

How to post a sync request?

Question asked by xinyieric on Mar 7, 2011
Hi Guys,

if i use "Alfresco.util.Ajax.jsonPost()", it means post a async request.
but now i want to post a sync request,how can i do for it?

Below is the code,but it has some problem.

var xmlhttp;

if (window.XMLHttpRequest)
     xmlhttp = new XMLHttpRequest();
else if (window.ActiveXObject)
     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

var URL = Alfresco.constants.PROXY_URI + "/slingshot/lock/dsunlock/" + nodeRef.uri;"POST",URL, false);

if (xmlhttp.status == 200) {
   return true;
} else {
   return false;

Thanks very much for advance