Ciao,
grazie mille per il tuo suggerimento... nel frattempo avevo già trovato qua e la qualcosa.... ma non funziona (ammesso che trasmetta veramente i dati).
Riporto sotto il codice:
Pagina di invio:
<input class="bottone" type="button" value="AGGIUNGI" onClick="AddCategory(1,'DOC','loaddiv(\'buildTreeF ileman.asp?category=3\',\'tab0\')');">
js:
var http = createObject();
function createObject() {
if (!(document.getElementsByTagName || document.all))
return;
var ret = null;
try {
ret = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
ret = new ActiveXObject('Microsoft.XMLHTTP');
} catch (ee) {
ret = null;
}
}
if (!ret && typeof XMLHttpRequest != 'undefined')
{
ret = new XMLHttpRequest();
return ret;
}
}
function AddCategory(CurrentID, ItemType,toDoOnEnd)
{
var qsajax = "../common/ajax_file_function.asp?action=addcategory&id=" + CurrentID + "&ItemType=" + ItemType + "&toDoOnEnd=" + toDoOnEnd
ExecAjaxPOST(qsajax);
}
function ExecAjaxPOST(qsajax)
{
var url = qsajax
if (http)
{ http.open('post', url, true);
http.onreadystatechange = handleResponse_dati;
var str="newCategoryName=" + encodeURIComponent(document.getElementById("newCat egoryName").value)
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.send (str);
}
}
La pagina ASP ajax_file_function.asp non estrae i valori che, salvo errore, dovrebbero essere disponibili nell'oggetto request.form
Dove sbaglio???
Grazie
Edo