hi meteorites, i’ve problem to change the value after update process… this’s my code.please help me
Template. edit_peralatan.events({
‘submit .peralatan’: function (event){
event.preventDefault();
var currentPostId= Session.get ('this._id');
var profil=Profil.findOne(currentPostId);
var properties={
kategori: $(event.target).find('[name=kategori]'). val(),
jenama: $(event.target).find('[name=jenama]'). val(),
trPerolehan: $(event.target).find('[name=trPerolehan]'). val(),
noSiri: $(event.target).find('[name=noSiri]'). val(),
noRedicare: $(event.target).find('[name=noRedicare]'). val(),
};
Profil.update( currentPostId,{
$set: properties},
function (error){
if (error){
alert (error.reason);
}else{
Router.go('list_inventori',{_id:currentPostId});
}
});
}
});