저는 약간의 코드 작업을하고 있었는데 왜 이것이 항상 실패하는지 보지 못합니다. 내가 그것을 디버깅하려했지만, ASP 페이지는 참조 점이 중단 점에 도달하지 않을 것입니다. (힌트 어쩌면 그것은 페이지를 가져 오지 않는가 ??). 데이터에 대한 부분 : JSON.stringify ({variables})가 제대로 작동하는지 확인하려고 게시물 바로 앞에있었습니다.하지만 작동하지 않았습니까?ASP 페이지를 AJAX로 보내려고했지만 결코 성공하지 못했습니다.
내가하고있는 일이 있습니까? 여기서 뭐라구? ASP의 서버 측 부분에
$.ajax({
type: 'POST',
url: 'AutoComplete.asmx/getWebFormDesignFieldContents',
data: {
'fe_name': "*",
'count': 200, //this might need to be adjusted slightly. I may want to make it more OR less.
'also_search_fe_desc': true,
'opts': opts
},
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (result) {
//success
$("div.modal").replaceWith($(result));
$("div.modal").fadeIn();
},
error: function (result) {
//error
//alert("Error: "+result.statusText);
$("div.overlay").fadeOut();
}
});
나는이 :
public String getWebFormDesignFieldContents(String fe_name, int count, bool also_search_fe_desc, String opts)
{
String retValue = "";
...
return retValue;
}
JSON으로 retValue를 인코딩해야합니까? 디버깅을 할 수있는 방법이 있나요? 그래서 서버 측을 하나씩 살펴볼 수 있습니까? 지금까지, 나는 당신의 2 개의 reccomendations를했다. 여전히 오류가 있기 때문에 내부에서 해킹을 시도하여 요청이 아직 실패하지는 않았는지 확인하기 위해이 문제를 해결할 수있는 정보를 얻으려고합니다. 그러나 뭔가 다른 것입니다. – Fallenreaper
try {} catch로 ASP를 래핑했습니다. 빈 문자열을 반환했습니다. – Fallenreaper
그래서 JSON.Stringify ({ELEMENETS}) – Fallenreaper