62,046
社区成员
发帖
与我相关
我的任务
分享
<asp:UpdatePanel runat="server" ID="UP3" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<div id="divCoupon" style="display: none; width: 250px">
<table cellpadding="0" cellspacing="0" border="1px" width="100%" rules="none" style="border-color: Blue">
<tr>
<tr style="height: 50px">
<td width="100px" align="center">优惠券主类型:</td>
<td><asp:DropDownList runat="server" ID="ddlCouponType" Width="150px" onchange="couponTypeChanged()">
<asp:ListItem Text="代金" Value="LOC"></asp:ListItem>
<asp:ListItem Text="实物" Value="GOODS"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr style="height: 50px">
<td width="100px" align="center">优惠券详细分类:</td>
<td>
<asp:DropDownList runat="server" ID="ddlCTD" Width="150px">
<asp:ListItem Text="--请选择主类型--" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</div>
</ContentTemplate>
<%--<Triggers><asp:AsyncPostBackTrigger ControlID="btnHideTypeChanged" /></Triggers>--%>
</asp:UpdatePanel>
<asp:Button runat="server" ID="btnHideTypeChanged" OnClick="btnHideTypeChanged_Click" Style="display: none" />
function couponTypeChanged() {
xmlHttp = GetXmlHttpObject();
var url = "vipMaster.aspx?type=couponTypeChanged&listItem=" + $("#ctl00_cph_ddlCouponType").val();
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
if (xmlHttp.responseText == "success") {
$("#ctl00_cph_btnHideTypeChanged").click();
}
}
}
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.send(null);
}
protected void btnHideTypeChanged_Click(object sender, EventArgs e)
{
UP3.Update();
}