Risolto:
Codice PHP:
...
if (confirm('Spostare la cartella '+node.title+'?'))
{
//document.location.href = "tree.php?moveDir&action=down&idDir="+node.objectId;
comunicazione_ajax_backend("tree.php?moveDir&action=down&idDir="+node.objectId);
dojo.widget.byId('treeController').move(node,node.parent,node.getParentIndex()+1);
}
con:
Codice PHP:
function comunicazione_ajax_backend(server_page)
{
// Richiama lo script desiderato, ajax-style.
if (typeof window.ActiveXObject!="undefined") ajax = new ActiveXObject("Microsoft.XMLHTTP");
else ajax = new XMLHttpRequest();
ajax.open("GET",server_page,true);
ajax.setRequestHeader("Connection","close"); // no connessioni persistenti.
// Handler della risposta.
ajax.onreadystatechange = function() { if (ajax.readyState==4) handler_risposta_server(ajax.responseText); }
ajax.send();
return true;
}