Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //edit data product
- $('.edit_button').on("click", function(e) {
- var id = $(this).data('id');
- var src= base_url + "uploads/product";
- // alert(src); here i can get whole url
- $.ajax({
- url: base_url + "product/edit/"+id,
- type: "GET",
- dataType: "JSON",
- success: function(data)
- {
- //images from database
- var foto= data.foto;
- if (foto==null) {
- // alert(foto); here is i can get right name foto
- $('#images-from-db-here-put-here').html('Freddy is here with foto null');
- }
- else
- {
- // alert(src/foto); here i get src/foto hope i get spesific foto in folder what do i wrong in here
- $('#images-from-db-here-put-here').html("<img src='src/data.foto'>");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement