magari fosse così semplice spetta ti posto il codice diretto sperando di non farti incasinare la vita a quest'ora
Codice PHP:
function xmap(hid, req)
{
var xmlHttp = getXMLHttp();
//document.write(hid);
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
return ret_xmap(xmlHttp.responseText);
}
}
xmlHttp.open("GET", "obs/funzioni/funxmappa.php?a=xmappa&hid="+hid+"&req="+req, true);
xmlHttp.send(null);
}
function ret_xmap(response)
{
//document.write(response);
return response;
}
nell'altro file c'è (ti posto lo spezzone interessato):
Codice PHP:
nome=xmap(hid,'nome');
//xmap(hid,'descrizione');
GEvent.addListener(marker, 'click', function(){
map.openExtInfoWindow(
point,
"simple_example_window",
"<div class='titless'>"+nome+"</div><div class='desc'></div>",
{beakOffset: 3}
);
});
Alla fine il valore di nome è undefined posto che in ret_xmap(response); tramite il doc.write h oappurato che il risultato arriva