javascript - JQuery popup not working after continuous call -
I am using MVC 4 for my project and trying to edit or display my data on popup I am
When I call my open popup code 6 or 7 times, I get JavaScript error.
My Controller
Public Action OpenEditForm (String Object Paragraph, String Formats) {BranchNotesDetailViewModel viewModel = New BranchNotesDetailViewModel (); // .................. Back partial view ("edit", scene model); }
and my javascript code is
myDialog = $ (" "); Function: (auto), width: 'Auto', Model: true, close: (my_dialog.dialog ({autoOpen: false, title: name, resizable: false, position: 'center', stack: true, height: 'Auto':: function (event, UI) {// remove div with all data and events myDialog.remove (); //myDialog.dialog (''close ')}}}} $ (' # brunch Notes (grid-line '). Click (function () {var json = $ (this). Child (' td: eq (1) ') .text () .tim (); $ .ajax ({ ContentType: 'application / html', url: '@ Url.Action ("OpenEditForm", "BranchNotes"), Data Type:' html ', Type:' GET ', Data: {objectParam: json, formStatus: "1 "}}). (Function (results) {CreateDialog ('Detail'); myDialog.html (results) .dialog ('open');}};}} $ (function () {$ (document) .jax full (function (event, request, settings) {// restart AOX after any new form to DOM To enable client validation for fields that are $. Validator.unobtrusive is enabled Paras (document);});}); OpenOffForm Crelet () {$ .ajax ({contentType: 'application / html', url: '(FormEditForm "," BranchNotes "), Data Type:' html ', Type:' GET ', Data: {FormStatus:' 2 '}}) (function (result) {CreateDialog (' Expand'); MyDialog.html (results) .dialog () Dialog ('Open');}); } When I open the dialog once or twice it works, but after the fifth or six times this exception crashes with the javascript runtime error: due to error 80020101 operation complete Could not be done
I tried to find something after a memory problem or AJAX call but I do not know where or what is there any way to handle it? I have read about the problems that some forums say that the comments are the reasons for the areas but it does not work for me.
I got my error I have two layouts, one for the main page for an edit page And I saw that some junky script files are given in both pages. I cleaned the editing layout with jquery scripts, then everything works fine.
Comments
Post a Comment