Recently written pages that contain a lot of Ajax

Source: Internet
Author: User

<%@ taglib uri= "/web-inf/struts-html.tld" prefix= "html"%>
<%@ taglib uri= "/web-inf/ule-taglib/ule.tld" prefix= "Ule"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title> Brand Maintenance </title>
<c:set var= "BasePath" value= "${pagecontext.request.scheme}${"://'}${pagecontext.request.servername}${': '}${ Pagecontext.request.serverport}${pagecontext.request.contextpath} "></c:set>
<link href= "${basepath}/css/item/main.css" rel= "stylesheet" type= "Text/css" >
<link rel= "stylesheet" href= "Http://i0.ule.com/tomshopping/c/sys/csslib/110119/APE-admin.css"/>
<link rel= "stylesheet" href= "Http://i0.ule.com/tomshopping/c/sys/130111/template-admin.css"/>
<script type= "Text/javascript" src= "Http://i0.ulechina.com/j/lib/jquery.js" ></script>
<script type= "Text/javascript" src= "Http://i0.ule.com/j/jend/jend.js" ></script>
<script type= "Text/javascript" language= "JavaScript" >
$ (document). Ready (function () {
$ ("Div[name=deletebrand]"). Bind ("click", Function () {
var _this = $ (this);
var brandid = _this.attr ("id");
JEND.page.confirm (' Are you sure you want to delete the brand, the delete operation can be revoked at the brand Recycle Bin? ',
function () {
$.ajax ({
URL: ' ${basepath}/brand/api/deletebrand.action ',
Type: ' Post ',
Data: {Brandid:brandid},
DataType: ' JSON ',
Success:function (data) {
if (data.num==1) {
JEND.page.confirm (Data.message,
function () {
Window.location.href = "${basepath}/brand/querybrandall.action";
});
}else if (data.num==2) {
JEND.util.dialog.alert (Data.message);
}
},
Error:function () {
JEND.util.dialog.alert ("Delete brand failed");
}
});

});
});

$ ("Div[name=updatebrand]"). Bind ("click", Function () {
var _this = $ (this);
var brandid = _this.attr ("id ");
var form = document.getElementById (' Brandoperatorform ');
$ ("#brandOperatorForm"). attr ("Action", "${basepath}/brand/updatebrand.action");
Document.brandOperatorForm.brandId.value = Brandid;
Form.submit ();
});

$ ("Div[name=mergebrand]"). Bind ("click", Function () {
var brandid=$ (this). attr ("id");
var brandname=$ (this ). attr ("fname");
$ ("#currentBrandId"). HTML (Brandid);
$ ("#currentBrandName"). HTML (brandname);
JEND.page.dialog.show ({
Title: ' Branding merge ',
ID: ' Merbranddiv ',
width:600,
height:600,
top:200,
Bottom: {
Callback:function () {
var Oldbrandid = $ ("#oldBrandId"). Val ();
$.ajax ({
URL: ' ${basepath}/bran D/api/merbrand.action ',
Type: ' Post ',
Data: {brandid:brandid, oldbrandid:oldbrandid},
DataType: ' JSON ',
Success:function (data) {
if (data.num== 1) {
JEND.page.confirm (data.message,
function () {
Window.location.reload ();
});
}else if (data.num== 2) {
JEND.util.dialog.alert (data.message);
}
}
});
}
}
});

});

$ ("Div[name=branddisc]"). Bind ("click", Function () {
var _this = $ (this);
var brandid=_this.attr ("id");
Window.location.href = "${basepath}/brand/updatebranddesc.action?brandid=" +BRANDID;

});

});

Inquire
function query () {
Brandoperatorform.submit ();
}

Brand to be audited
function Brandcheck () {
Window.location.href = "${basepath}/brand/brandcheck.action";
}

Brand Recycling Station
function brandrecycled () {
Window.location.href = "${basepath}/brand/brandrecycled.action";
}
</script>
<body>
<div class= "Maininner" >
<ul class= "Crumbs" >
<li><a href= "#" class= "score-0" > Admin system </a><span class= "direct" >&gt;</span></ Li>
<li><a href= "${basepath}/brand/showbrandmanage.action" > Brand management </a><span class= "direct" > &gt;</span></li>
<li> Brand Management </li>
</ul>
<ul class= "Tabs-nav Clear" style= "margin-bottom:10px;" >
<li class= "Tabs-nav-title btn bwhite Borange" > Brand management </li>
<li class= "Tabs-nav-title btn bwhite" onclick= "Brandcheck ();" > Pending Brand </li>
<li class= "Tabs-nav-title btn bwhite" onclick= "brandrecycled ();" > Brand Recycling Station </li>
</ul>

<form id= "Brandoperatorform" name= "Brandoperatorform" method= "POST"
action= "${basepath}/brand/querybrandall.action" >
<table class= "tab MB10" Width= "100%" border= "0" cellpadding= "0"
cellspacing= "1" >
<tbody>
<tr>
&LT;TD colspan= "6" style= "Text-align:left;" >

<span> Find </span>
</td>
</tr>
<tr>
&LT;TD scope= "Row" >
Brand Id:<input name= "Brandid" id= "Brandid" type= "text" onblur= "Checkbrandid ();" Value= "${brandid}"
Onkeyup= "This.value=this.value.replace (/\d/g, ')"
Onafterpaste= "This.value=this.value.replace (/\d/g, ')"/>
Brand Name: <input name= "brandname" id= "brandname" type= "text" value= "${brandname}"/>
Brand English name: <input name= "brandnameen" id = "Brandnameen" type= "text" value= "${brandnameen}"
Onkeyup= "Value=value.replace (/[^\w\.\/]/ig, ')"/>
<input type= "button" value= "Query" class= "btn borange fw7" onclick= "query ();" />
<input type= "button" value= "Add" class= "btn borange fw7" onclick= "window.location= ' ${basepath}/brand/ Addbrand.action ' "/>
</td>
</tr>
</tbody>
</table>
</form>

<table class= "tab MB10" Width= "100%" border= "0" cellpadding= "0"
cellspacing= "1" >

<tbody>
<tr>
&LT;TD colspan= "9" style= "Text-align:left;" >

<span> Query Results </span>
</td>
</tr>
<tr>
<th align= "center" > Brand id</th>
<th align= "center" > Brand name </th>
<th align= "center" > Brand English name </th>
<th align= "center" > Brand Pinyin </th>
<th align= "center" > Sort </th>
<th align= "Center" > Whether to show </th>
<th align= "center" > Status </th>
<th align= "Center" colspan= "3" > Operations </th>
</tr>
<c:if test= "${Empty Brandlist}" >
&LT;TR align= "center" >
&LT;TD height= "align=" Center "colspan=" 9 "> cannot find a qualifying brand, please reset the query criteria </td>
</tr>
</c:if>
<c:if test= "${! Empty Brandlist}" >
<c:foreach var= "brand" items= "${brandlist}" >
<tr bgcolor= "#FFFFFF" height= ">"
&LT;TD align= "center" >${brand.brandId}</td>
&LT;TD align= "Center" >${brand.brandname}
&LT;TD align= "center" >${brand.brandNameEn}</td>
&LT;TD align= "center" >${brand.brandNamePinyin}</td>
&LT;TD align= "center" >${brand.displaySeq}</td>
&LT;TD align= "center" >${brand.displayflag==1? Yes ': ' No '}</td>
&LT;TD align= "center" >${brand.certificateflag==0? Pending review ': Brand.certificateflag==1? ' Audit Pass ":" Audit Reject "}</td>
&LT;TD align= "center" width= "130px" >
<span>
<span>
<div id= "${brand.brandid}" Name= "Deletebrand" style= "Float:middle;display:inline" ><a href= "#" >& nbsp; Delete &nbsp;&nbsp;</a></div>
</span>
<c:if test= "${brand.certificateflag!=2}" >
<span>
<div id= "${brand.brandid}" Name= "Updatebrand" style= "Display:inline" ><a href= "#" > Modify &AMP;NBSP;&AMP;NBSP ;</a></div>
</span>
<span>
<div id= "${brand.brandid}" Name= "Mergebrand" Fname=${brand.brandname} style= "Display:inline" ><a href= "#" > Merger &nbsp;</a></div>
</span>
</c:if>
<div id= "${brand.brandid}" Name= "Branddisc" Fname=${brand.brandname} style= "Display:inline" ><a href= "#" > Details &nbsp;</a></div>
</span>
</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>

<c:if test= "${not Empty Brandlist}" >
<ule:paginationtag url= "${basepath}/brand/querybrandall.action?" pageindex= "${pageindex}" totalPage= "${ TotalPages} "pagesize=" ${pagesize} "/>
</c:if>

<div id= "Merbranddiv" style= "Display:none" >
<div style= "MARGIN:5PX; padding:5px; " >
<table width= "100%" border= "1" height= "160px" border= "0" >
<tr height= "35px" >
&LT;TD width= "30%"
Style= "Text-align:left; padding-left:10px; font-size:13px; Color: #000000; " > Current Brand Id:</td>
&LT;TD style= "padding-left:10px; font-size:13px; Color: #000000; "
Id= "Currentbrandid" ></td>
</tr>
<tr height= "35px" >
&LT;TD class= "Mer"
Style= "Text-align:left; padding-left:10px; font-size:13px; Color: #000000; " > Brand name:</td>
&LT;TD style= "padding-left:10px; font-size:13px; Color: #000000; "
Id= "Currentbrandname" ></td>
</tr>
<tr height= "35px" >
<td
Style= "Text-align:left; padding-left:10px; font-size:13px; Color: #000000; " > Need to merge Brand id:</td>
<td><input type= "text" height= "30px" id= "Oldbrandid" onkeyup= "This.value=this.value.replace (/\D/g, ')"
Onafterpaste= "This.value=this.value.replace (/\d/g, ')"
Style= "margin-left:10px; width:150px; height:25px; "/></td>
</tr>
<tr rowspan= "2" >
&LT;TD class= "mer" colspan= "2" >
<p>
<span style= "color: #000000; Height: "30px" > <span
style= "font-family: ' Arial negreta ', ' Arial '; font-weight:700; Color: #FF0000; " >*</span>
Products under the merged brand will be migrated to the current brand, the merged brand will be deleted, and the merge will not be able to be rolled back, please proceed with caution
</span>
</p>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>

Recently written pages that contain a lot of Ajax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.