note 117430 deleted from function.com-create-guid by cmb
| From: | cmb@php.net | Date: | Wed, 10 Jun 2015 11:02:26 +0000 |
| Subject: | note 117430 deleted from function.com-create-guid by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202802@lists.php.net to get a copy of this message | ||
Note Submitter: tamtam9955 at hotmail dot com
----
$.ajax({
type: 'GET',
url: 'http://dtdl.ehb.be/~kevin.felix/api/get.php',
dataType: 'json',
success: function(data){
$.each(data, function(key, value){
var html = '<li>'+
'<p><strong>Naam:</strong> <span class="noedit
naam">'+ value.naam +'</span> <input class="edit naam"
/></p>'+
'<p><strong>Drank:</strong> <span class="noedit
type">'+ value.type +'</span> <input class="edit type"
/></p>'+
'<p><strong>Prijs:</strong> <span class="noedit
prijs">'+ value.prijs +'</span> <input class="edit prijs"
/></p>'+
'<button data-id="'+ key +'"
class="verwijder">Verwijder</button>'+
'<button data-id="'+ key +'" class="wijzig
noedit">Wijzig</button>'+
'<button data-id="'+ key +'" class="wijzigSave
edit">Bewaar</button>'+
'<button data-id="'+ key +'" class="wijzigStop
edit">Annuleer</button>'+
'</li>';
$('#orders').append(html);
});
},
error: function(){
alert('Geen correcte URL!');
}
});