AJAXを使ってインラインでリスト項目を編集するには?

I have a text field,button and ul. User enters email in the textfield and clicks a buttons to make an AJAX call. If the email has any user in the database, then it updates the ul->li. I want to provide user with an opportunity to edit the data in ul->li. I am unable to do so. Do you have any ideas on how I can do this?

#tasks-add= Button
#foo= textfield
#tasks= ul

<script>(This script to make Ajax call and update ul)
                  $("#tasks-add").click(function(){
                  $.ajax({
                  success: function(html){
                  $(".tasks").prepend(html);
                  },
                  type: 'post',
                  url: '<?php echo $this->createUrl('field')?>',
                  data: {
                  index:$("#foo").val(),index1: $(".tasks li").size()
                  },
                  cache: false,
                  dataType: 'html'
                  })
              });


               </script>


     <script> (this script to in line edit ul using jeditable)
 $(document).ready(function() {
     $('.tasks li').editable('http://www.google.com');
 });
</script> 



              
    ***// this is what I am updating through Ajax. I want inline edit to be performed here***
<><><><><><><>><><>><><><><><><><><><><> _task.php **
  • <div class="panel"> <?php if($check=='Player already existed'){ echo $index1.". ".$fname ." ".$lname; echo ""; } else echo ""; ?> </div>
  • **
    1

    答えはありません

    0