I want To display Image from database in "img" Tag Using Ajax.
 <div class="col-md-3">
    <div class="form-group">
       <label for="EditcontactNoSelector">Employee Picture</label>
         <img src="" id="EditImage" alt="Not Found">
    </div>
 </div>
This is the Ajax Code Which goes to "master_get_employees" and select the image path from the database. Now i don't know how to Display That image in "Img" tag?
 $(".Edit-modal").on("shown.bs.modal", function (e) {
           var button = $(e.relatedTarget); // Button that triggered the modal
           var ID = button.parents("tr").attr("data-id");
           var modal = $(this);
           console.log(ID);
           $.ajax({
              url: "'.base_url().'Employees/master_get_employees",
              data: {ID:ID},
              type: "POST",
              success:function(output){
                try{
                   modal.find("input#EditImage").val(outputData.pic);
             enabled=outputData.IsEnabled;
                        if(enabled=="1")
                        {
                        modal.find("#editIsEnabled").prop("checked",true);
                        }else if(enabled=="0"){
                        modal.find("#editIsEnabled").prop("checked",false);
                        }
                }
                catch(ex){
                    var split = output.split("::");
                    if(split[0] === "FAIL"){
                        Shafiq.notification(split[1],split[2])
                    }else{
                        Shafiq.notification("Could Not Load Data, Please Contact System Administrator For Further Assistance","error");
                    }
                }
              }
           });
    });
And Here is the "master_get_employees" function Where the Ajax request is accepted and the data is retrieved from database.
function master_get_employees()
    {
        if ($this->input->post()) { //If Any Values Posted
            if ($this->input->is_ajax_request()) { //If Request Generated From Ajax
                $ID = $this->input->post('ID');
                if (!isset($ID) || !is_numeric($ID)) {
                    echo "FAIL::Something went wrong with POST request, Please contact system administrator for further assistance::error";
                    return;
                }
                $table = "employees e";
                $selectData = "e.id AS e.Picture as pic";
                $joins=array(
                    array(
                        "table"=>'designation d',
                        "condition"=>'d.id=e.Designation',
                        "type"=>'left',
                    ), array(
                        "table"=>'shifts s',
                        "condition"=>'s.id=e.shift',
                        "type"=>'left',
                    ));
                $where = array(
                    'e.id' => $ID, 'e.IsActive' => 1
                );
                $result = $this->Common_model->select_fields_where_like_join($table, $selectData,$joins, $where, TRUE);
                print json_encode($result);
            }
        }
    }
 
     
     
    