linccce

Problem with getting parent options

Sep 19th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery('body').on('click','#yt22',function(){jQuery.ajax({'type':'post','url':$(this).attr("href"),'success':function(data) {
  2.                                 var itemid = $(this).attr("id"); //this doesn't return id. Why?
  3.                                 $.fn.yiiGridView.update("duties-grid");
  4.                                 $.fn.yiiGridView.update("project-grid");
  5.                                
  6.                                 //var url = $(this).attr("href"); //This doesn't return the url used in the parent function.
  7.                                 console.log(itemid);
  8.                                 //var arr = url.split("/");
  9.                                 //var id = arr[arr.lenght-1];
  10.                                
  11.                                 /*console.log(id);
  12.                                 $.post("/YiiMain/app/ktcapskaita/index.php/form/UpdatedList", { "project_id": id }, function(data){
  13.                                         var data = JSON.parse(data);
  14.                                         $("#Duties_project_id").html(data.dropdown);
  15.                                 });*/
  16.                                 },'cache':false,'data':jQuery(this).parents("form").serialize()});return false;});
Advertisement
Add Comment
Please, Sign In to add comment