var bordCmnt = {
saveUrl : '/iims/gws/bord/saveCmnt.json',
save : function() {
var _this = this;
var isOk = _this.saveValidate();
/*
var nameDispYn_Temp = document.getElementsByName('nameDispYn');
var nameDispYn;
for(var i=0;i<nameDispYn_Temp.length;i++){
if(nameDispYn_Temp[i].checked == true){
nameDispYn = nameDispYn_Temp[i].value;
}
}*/
if(isOk) {
$.ajax({
url : _this.saveUrl,
type : 'post',
dataType : 'json',
data : {
pstgNo : $('#pstgNo').val(),
cmnt : $('#new_cmnt').val(),
nameDispYn : $('input[name=nameDispYn]:checked').val()
}
})
.done(function(data, textStatus, jqXHR){
//console.log(data);
var appendHtml = _this.getAppendHtml(data.boardComment);
$("#new_cmnt_tr").before(appendHtml);
// 입력값 초기화
$('#new_cmnt').val('');
});
}
}
};
'Java Programming > JQuery' 카테고리의 다른 글
jQuery.extend() (0) | 2014.04.16 |
---|---|
[JQUERY] ajax 방법 (0) | 2014.03.20 |
[Ajax]로딩.. (0) | 2014.02.28 |
[JQuery] JSON (0) | 2014.02.26 |
[JQuery] Serialize() (0) | 2014.02.26 |