0
죄송합니다.이 자바 초보자 질문입니다. 내 jqGrid 함수는 처음에는 잘 작동하지만 두 번째 호출에서는 아무 일도 일어나지 않고 요청이 발생하지 않습니다. 코드 조각 :jqGrid : 그리드 함수가 한 번만 실행됩니다.
$(document).ready(function() {
$("#submit").click(function(e) {
e.preventDefault();
var brandsDropdown = document.getElementById("brandsDropdown");
var brandId = brandsDropdown.options[brandsDropdown.selectedIndex].value;
var searchParams = "brandId=" + brandId;
doGrid(searchParams);
});
});
function doGrid(searchParams) {
alert("doGrid, searchParams:" + searchParams);
var url="${pageContext.request.contextPath}/services/setup/project";
var editurl="${pageContext.request.contextPath}/services/setup/project";
$("#projectList").jqGrid({
url: url + "?" + searchParams,
editurl: editurl,
datatype: 'xml',
mtype: 'GET',
...
});
경고()는 doGrid()가 실제로 두 번째로 성공적으로 호출 된 것을 보여줍니다. 그래서 실제로는 $ ("projectList") .jqGrid() 함수는 실행되지 않거나 자동으로 실패합니다. 내가 부르는 방식으로 명백한 실수를하지 않았다면?