javascript - JQuery UI Dialog not closing properly -
I am using JQuery dialog to present a partial view.
Scenario:
Step 1: Click the 'add' anchor link, the dialog will open with the text box.
Step 2: User fills the text box value and clicks on Save button.
Step 3: Details will be saved and the dialog will be closed.
Step 4: Now the user will click on the 'View' anchor link, only the text box value will open for reading.
Step 5: User will click on Cancel button.
Step 6: Again click on the user 'add' anchor link, and open the dialog with the text box.
Step 7: Click the value and Save button when the user fills the text box.
Step 8: The problem starts here . This user should save the details that have been entered so far, but it is saving the old values (which we have seen in step 4). I have tried to lower the code to click and present partial view on open dialog And clicking on the Cancel button, I have written the code below I have tried different code to stop the dialogue, but no one is working well for me. Can anyone guide me on this? I "); var title =" "; if (mode == 1) {title =" edit job description ";} and if (mode == 2) {title =" see job description ";}" And {title = "add job description";} $ .ajax ({url: "/ task / task deductible weave", type: "post", datatype: "html", data: {"task id": Tasked, "Mode": Mode}, Success: Function (Data) {$ ('#Davitech Dictate'). HTML (Data); $ ("#Divastascated Delat") dialog ({AutoOpen: false, width: 500, Height: 450, Model: True, Reasonable: Wrong, drag-able: true, title: title, open: task ($ 'div.ui-widget-overlay'). Hide (); $ ("div.ui-dialogue"). : '' First '). Remove ();}} $ (' A.ui-dialog-titlebar-close '). Remove (); $ (' # divProcessImage ') .css ({"display": "none"}) }}, Error: function (req, $ ('' display '': "block", "width": "", "height": ""}}) $ ('#divProcessImage'). CSS ({"display ":" None "});}}); and clicking on the Close button, I am using the code.
var div = $ ("# DivTaskDetail"); Var title = ""; If (mode == 1) {title = "edit job description"; } And if (mode == 2) {title = "see job description"; } And {title = "add job description"; } Div.load ("Modal: true, width: 500, height: 450," div.load "/ Tasks / Task Deducted Weave? TaskID =" + TaskID + "and mode =" + mode, function { Title: Title, Resizable: Incorrect, Off: Function () {$ (this) .dialog ("Closed");}})}};
function onClickCancelTask () {$ ('# DivTaskDetail'). Dialog ("close"); }
1. $ ('# DivTaskDetail') below (); 2. $ ('# DivTaskDetail'). Remove (); 3. $ ('# DivTaskDetail'). Dialogue ('deleted'). Remove (); 4. $ ('.ui-icon-closethick'). Click (); 5. $ ('# DivTaskDetail'). Dialog ("off"); 6. $ ('# DivTaskDetail'). Dialog ("destroyed"); 7. $ ("#divatuscited"). Dialog ("destroyed"); . $ ('# DivTaskDetail') dialog ('off') dialog ('delete'). 8. $ ('# DivTaskDetail'). Dialog ("destroyed"); Deleting $ ('# DivTaskDetail').
var div = $ ("# DivTaskDetail)" As I have used the code below to open partial view.
$ ('# DivTaskDetail'). Communication ("deleted"); $ ('# DivTaskDetail') HTML ("").
Comments
Post a Comment