Why didn't work my classic asp source code?

为君一笑 提交于 2019-12-13 09:52:02

问题


When i run this code, nothing displayed, it shows blank. I checked inspector and network tab..

function storevaluestoSession()
{
    var somewhere=map.getCenter()
    map.setCenter(somewhere);
    var somewhere=String(somewhere)
    var nloc=somewhere.search(',');
    var location2=String(somewhere).substring(1,nloc);
    var sw2=String(somewhere);
    var lsw2=sw2.length-1;
    var lsw22=nloc+1;
    var location3=sw2.substring(lsw2,lsw22);
    var myLatLng = new google.maps.LatLng(location2,location3); 

    var lat2=ltrim(location2.toString());
    var lon2=ltrim(location3.toString());
    var CurrentpkFamily=<%=session("pkfamily")%>;

    var xmlhttp;
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.open("GET","sessionhelper.asp?lat="+lat2+"&lon="+lon2+"&CurrentpkFamily="+CurrentpkFamily, true);
    xmlhttp.send();
}

And i am new to asp, can anyone help?

Thanks,


回答1:


The response is in xmlhttp.responseXML. Add

  alert(xmlhttp.responseXML);

before the last } to see server response.



来源:https://stackoverflow.com/questions/29792518/why-didnt-work-my-classic-asp-source-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!