Visualforceページを呼び出すajax関数があります。応答は、html doctype で結果を返します。データだけ欲しい。
$(document).ready(function() {
$.ajax({
type: "POST",
url: "/apex/HotStuckLeadReportAjaxPage",
data: { name: "John", location: "Boston" }
}).done(function( msg ) {
alert( "Data Saved: " + msg );
});
});
出力:
Data Saved:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
{"sEcho":0,"iTotalRecords":"2","iTotalDisplayRecords":"2","aaData":[["8","1","sdf","test","test"],["9","12","asdf","asdf","asdf"]]}</html>