function loadEditDialog(tag,event)
    {        
        event.preventDefault();       
        var $loading = $('<img src="../../Images/ajaxLoading.gif" alt="loading" class="ui-loading-icon">');
        var $url = $(tag).attr('href');
       // var $url = $('<div> <input type="text" /></div>');
        var $title = $(tag).attr('title');
        var $dialog = $('<div></div>');
       // var $dialog = $('#diag');        
        $dialog.empty();
        $dialog
            .append($loading)
            .load($url)
            .dialog({
                autoOpen: false
                , title: "Edit"
                , width: "310px"
                , modal: true
                , minHeight: 50
                , show: 'fade'
                , hide: 'fade'
                , buttons: {
                    "Cancel": function () {                       
                        $dialog.dialog('close');                        
                    },
                    "Submit": function () {
                        var editData = {
                            'DesignationId': $('#DesignationId').val(),
                            'DesignationName': $('#DesignationName').val()
                        };

                        var resultJSON = JSON.stringify(editData);
                        $.ajax({
                            url: $url,
                            type: "POST",
                            cache: false,
                            traditional: true,
                            contentType: "application/json; charset=utf-8",
                            data: resultJSON,
                            datatype: "json",
                            success: function (data) {
                                alert("Saved Successfully!!!");
                                $dialog.dialog('close');
                                clearpopup();
                                fillDesigGrid();
                            },
                            error: function (xhr, ajaxOptions, thrownError) {               
                            }
                        });

                    }
                }

            });

        $dialog.dialog('open');
    };

there is data in textbox it can be seen below image enter image description here

but it is not getting passed in the array editData dfdfv

the data is being passed for first hit after that either repeated values are going or blank if i clear values of textbox

enter image description here

the "property value" is showing actual value an "attribute value" is showing previous. later "property value" goes blank even if values is there in text box

Related posts

Recent Viewed