超鏈接的 jquery action請求
$("a[name=delUser]").click(function(){
var location = $(this).attr("location");
var id = $(this).attr("id");
$.ajax({
url: "<c:url value='/userInfo/delCheckUser_'/>"+id,
type:'POST',
async:false,
dataType: 'html',
success: function(data){
if("success"==data){
$("#dialog-confirm").dialog({
resizable: false,
modal: true,
buttons: {
"確定": function() {
window.location=location;
$(this).dialog({modal:true});
},
"取消": function() {
$(this).dialog("close");
}
}
});
}else{
$("#show").html("<b>"+data+"</b>");
$("#show").dialog({modal:true});
}
}//end success
});//end ajax
});
$("#channelName").click(function() {
$("#channelName").colorbox({
href : '${pageContext.request.contextPath}/userInfo/channelFrom?parentTxtId=channel&parentTxtNameId=channelName',
iframe : true,
width : '800px',
height : '700px',
opacity : '0.3',
scrolling : false,
});
});