I am trying to write a function that will call getproduct.php?id=xxx
when clicked. I can get the innerHTML
portion to appear, but how do I also call t
You can do it with jQuery for example.
var id = 1;
$('#digital_download').html('Downloading...'); // Show "Downloading..."
// Do an ajax request
$.ajax({
url: "getproduct.php?id="+id
}).done(function(data) { // data what is sent back by the php page
$('#digital_download').html(data); // display data
});