我有更新的进度条,它适用于OnClick事件(服务器端),但我需要OnClientClick事件(客户端)的更新进度栏。updatepanel进度条onclientclick事件
你能解释一下,或者建议我做吗?
我已经尝试了下面的解决方案,但它不适合我。
JS:
function ComparableSearch() {
$get('UpdateProgress1').style.display = 'block';
window.scrollTo(0, 0);
GetRefineSearchDetailsMap(StreetNo[0], StreetNo[1], StreetName, State, County, ZipCodeFrom, ZipCodeTo, SalePriceFrom,
SalePriceTo, LivingArea, LivingAreaTo, SaleDateFrom, SaleDateTo, SubjectPropertyId, Section, Subdivision,
LotSizeFrom, LotSizeTo, YearBuiltFrom, YearBuiltTo, Stories, PrivatePool, FirePlace, Disclosure, IsListing,
City, Design, FirePlaceTo);
$("#map").show();
$("#MainSearchResult").hide();
return false;
$get('UpdateProgress1').style.display = 'none';
}
function GetRefineSearchDetailsMap(aStreetNoFrom, aStreetNoTo, aStreetName, aState, aCounty, aZipCodeFrom, aZipCodeTo, aSalePriceFrom,
aSalePriceTo, aLivingArea, aLivingAreaTo, aSaleDateFrom, aSaleDateTo, aSubjectPropertyId, aSection, aSubdivision, aLotSizeFrom,
aLotSizeTo, aYearBuiltFrom, aYearBuiltTo, aStories, aPrivatePool, aFirePlace, aDisclosure, aIsListing, aCity, aDesign, aFirePlaceTo) {
var SalesSearchCriteria = {
X1: X1,
X2: X2,
Y1: Y1,
Y2: Y
};
request = $.ajax({
url: "Form1004/SaleComparableHandler.ashx?type=GetRefineSearchDetailsMap&Tid=" + Math.random(),
type: "POST",
data: { "SearchCriteria": JSON.stringify(SalesSearchCriteria) },
async: true,
success: function (data) {
if (data.length > 0) {
if (data != "Error") {
}
else {
alert("Your session has been expired");
}
}
else {
alert("No data exists");
}
},
error: function (XMLHttpRequest, status, errorThrown) {
if (errorThrown != 'abort') {
PopUpAlertBox("Please try again...<br/><br/>Below error occured <br/><br/> " + errorThrown + "");
}
else {
PopUpAlertBox("Error : " + errorThrown + "");
}
}
});
return false;
}
不..这里我没有代码在服务器端。我的功能只能通过客户端工作 – 2015-03-02 12:23:17
我很抱歉我的答案。 – netwer 2015-03-02 12:24:15