代码:
function importData(pageForm, menuNavigationId, pageId)
{
showMessageHtml('messageDiv', "Importing data ........");
var url = getURLString(pageForm);
var urlstr = "importTemplate.do?userAction=importData&"
+ url.substring(0, url.length - 1);
ajaxFunction();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
document.getElementById('messageDiv').style.display = 'none';
if (xmlHttp.responseText == "success") {
alert("Data file read and saved successfully.");
} else {
alert("Error while Importing data: " + xmlHttp.responseText);
}
returnToPageUrl("page?pageId=" + pageId
+ "&opType=entry&modType=add&menuNavigationId="
+ menuNavigationId + "&menuPageId=" + pageId);
}
}
}
xmlHttp.open("POST", urlstr, true);
xmlHttp.setRequestHeader("Content-Type", "application/plain");
xmlHttp.send(null);
}
代替“导入数据............”我想传递一个显示页码的字符串......你能帮我如何再次调用 ajax 以获取页面状态。我从服务层函数传递这个字符串........需要尽快回复