jQuery - ajax 博客分类: 互联网技术jsp servlet
程序员文章站
2024-03-16 11:10:58
...
var prospectData = { "prospectID" : '${CustomerHolisticView.clientID}' };
if(confirm("Are you sure to delete this prospect record?")){
$.ajax({
url: '<portlet:resourceURL id='deleteProspect'></portlet:resourceURL>',
type: 'GET',
datatype:'json',
data: prospectData,
success: function(data){
data = data.slice(1, data.length-1);
if(data == 'SUCCESS'){
window.location = '<portlet:renderURL><portlet:param name='action' value='returnTosearchResult'/></portlet:renderURL>';
} else {
$('#errorProfile').html('<div>'+data+'</div>');
}
}
});
}