Example Code :
- function editRPLineAsset(ACTION){
- var str = ACTION;
- var ActionArray = str.split(',');
- //ACTION = 'EDIT-IF' + ',' + "" + ',' + RPLineID;
- //ACTION = ActionArray[0] + ',' + ActionArray[1] + ',' + ActionArray[2] + ',' + "" + ',' + "" + ','+ $('#BudgetNo_field').val();
- ACTION = ActionArray[0] + ',' + ActionArray[1] + ',' + ActionArray[2];
- var element = document.getElementById('BudgetNo_field');
- element.value = ActionArray[3];
- $( "#dialog-edit" ).dialog({
- resizable: false,
- width:600,
- height:200,
- modal: true,
- buttons: {
- "Yes": function() {
- //Send Get.
- var target = "rp_line_update.php?ACTION=" + ACTION;
- var ajaxManager = $.manageAjax.create('lifo', {queue: 'clear', preventDoubleRequests:true, abortOld: true});
- //Send Post.
- ajaxManager.add({
- url:target,
- data: {
- BudgetNo: $('#BudgetNo_field').val()
- //BudgetNoEnd: $('#BudgetNoEnd_field').val()
- },
- success: function(ret) {
- $( "#dialog-info" ).find('p').html("แก้ไขรายการเรียบร้อยแล้ว");
- $( "#dialog-info" ).dialog({
- resizable: false,
- width:400,
- height:180,
- modal: true,
- buttons: {
- "OK": function() {
- window.location.reload();
- }
- }
- });
- }
- });
- $( this ).dialog( "close" );
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- }
- });
- }
ไม่มีความคิดเห็น:
แสดงความคิดเห็น