Monday, January 6, 2020

Display image and href from database in Vue js & Javascript datatable


# You can do it :

Vue Js :

passport_nid: { 
           label: 'NID',
           render: (data,type,row) => { return '<img src=" '+ base_url+' '+"uploads/"+' '+"nid_image_folder/" + ' '+row.passport_nid+' " alt="" class="imageSize" width="70px">'}
  }, 


JavaScript :

Ex:01 .html('<img src="'+{{URL::asset('uploads/studentPhoto/')}}+' '+value.photo+'" width="200px;" height="200px">') 


Ex:02
 var url ='{{url("/privilege")}}';

 $("#my_country").html('<a href="'+url+'" title="Become a VIP">VIP Privileges</a>');

No comments:

Post a Comment

Ajax load lage with laravel.

 step-1:  HTML <div class="row">                     <div class="col-lg-12">                           <d...