Jquery post returns null




















What I'll eventually want to do is pull out the td elements from that table and insert them into another table on my current page. Loading the data into a hidden object in the document, and then using jquery to select the necessary id element produces the same result - that is, null in IE, and works otherwise. IE is very particular with what it "loads" into the DOM. If your content isn't well formed you would get this exact behavior. I had this same problem and it turned out to be that the element in question had a parent that wasn't properly closed.

My guess is that jQuery is parsing the response like it parses XML, which means find , filter , and a number of other methods are broken for some reason in IE. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 10 years, 4 months ago. Active 10 years, 4 months ago. Viewed 1k times. The problem is that, while this works in Firefox et al, it does not work in IE.

Any ideas? Improve this question. Is your markup well formed in the response data? That creates a problem in IE sometimes. Thanks, everyone, for your help. Upgraded the jQuery to the latest version, and it works fine now. Show 11 more comments. Active Oldest Votes.

Improve this answer. I've checked and verified that the content is well formed. Addendum - I've checked and verified that MY code is well formed. However, it's a page inside a 3rd party CMS that gets a lot of html automatically loaded in. It's possible that some of that might be malformed. If that's the case, is there a workaround? Or will I have to write my own code parser to pull out the stuff I need? Add a comment. A better solution might just be to add the response to the page and parse it there.

MVC will map the object for you, so you might as well skip the extract nesting of the form within the object. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. Asked 6 years, 4 months ago. Active 6 years, 4 months ago. Viewed times. I have been trying to post two parameteres AracID; console. Improve this question. Seems weird that you are serializing an entire form into one variable. Did you look to see what is being sent up in the Ajax request in the network tab of the console? Is there a particular reason you chose the later of two near-identical answers and only chose to comment on the other one?

Add a comment. Active Oldest Votes. Action "Save","AracKirala" ', data: data, Improve this answer. I mean add aracid property to model? Then could you tell me what will happaned if ViewModel have aracid property and controller have same extra parameter aracid? Something to test tomorrow. I'll let you know. My own answer updated to include this little factoid.



0コメント

  • 1000 / 1000