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



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

i trying create ajax function this:

var vm=$.noconflict(); vm(document).ready(function(){ var loadmore=function(e) { var idd=vm(this).attr("id"); alert(e.data.recordid); //it homecoming blog_comment_id if provide static value info key var aaa=e.data.recordid; vm.ajax({ type:"post", url:"ajaxhtml.php", data:({e.data.recordid: idd}), cache:false, success:function(res) { alert(res); vm("#"+e.data.divid).html(res); } }); }

and calling ajax function this, trying create dynamic provide div id , record id.

vm(function() { vm(".view_more").click({divid:"fgh",recordid:"blog_comment_id"},loadmore); });

it not working if provide info parameter this:

data:({e.data.recordid: idd}),

working for

data:({blog_comment_id: idd}),

so how create possible dynamic key.

help appreciate

javascript jquery ajax

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -