function saveRemoteDatas(){
//savedataflag
showPopup(document.getElementById(“savedataflag”),‘saving…’);
var flag = false;
jQuery.ajax({
type:“post”,
async: false,
url:“<%=path%>/billReportMgr/saveSingleChannel.action”,
success:function(msg){
if(parseInt(msg)>=1){showPopup(document.getElementById(“savedataflag”),‘savesuccess…’);
flag = false;
}else{
alert(“2”);
showPopup(document.getElementById(“savedataflag”),‘saveerror…’);
flag = true;
}
}
});
return flag;
}
function showPopup(inp,message) {
tip = new dhtmlXPopup();
alert(message);
tip.attachHTML(message);
var x = getAbsoluteLeft(inp);
var y = getAbsoluteTop(inp);
var w = inp.offsetWidth;
var h = inp.offsetHeight;
tip.show(x, y, w, h);
/*
alert(message);
if (!tip) {
tip = new dhtmlXPopup();
tip.attachHTML(message);
}
if (tip.isVisible()) {
tip.hide();
} else {
var x = getAbsoluteLeft(inp);
var y = getAbsoluteTop(inp);
var w = inp.offsetWidth;
var h = inp.offsetHeight;
tip.show(x, y, w, h);
}
*/
}
function hidePopup() {
if (tip)
tip.hide();
}
i use popup ,but when i invoke the method showPopup(inp,message),it can’t works,only display “saving…”,when the code was executed,message is not update.i think when save it success , the popup display “savesuccess” but it’s cann’t …what should i do ?