javascript - Ajax not working for dynamic key in data parameter -


I am trying to create an Ajax function like this:

  var vm = $ No dispute (); Vm (document) .ready (function () {var loadMore = function (e) {var idd = vm (this) .attr ("id"); alert (e.data.recordId); // this return blog_comment_id if i Provide stable value for data key aaa = e.data.recordId; vm.ajax ({type: "POST", url: "ajaxHTML.php", data: ({e.data.recordId: idd}), Cache: False, Success: Function (Race) {Warning (Leak); VM ("#" + e.data.divId) .html (res);}}}}}  

And calling this Ajax function in this way, I'm actually trying to make it dynamic where I will provide div id and record id.

  vm (function () View_more "). {DivId:" fgh ", r Record id: "blog_comment_id"}, load more);});  

This is not working if I am the data equivalent Ameter like this:

  Data: ({e.data.recordId: idd}), < / Code> 

  Data: ({blog_comment_id: idd}),  

So how do I get it with dynamic keys I can make

The aid will be appreciated


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -