This code below only works if i click on the button twice and I've got no clue why it does that.
Any hints would be appreciated. guess it's a .click function that's missing ?
<button onclick="getSummary('1');">button</button>
function getSummary(id)
{
$.ajax({ type: "GET",
url: 'ajax_test.php',
data: "user=<?php echo $_GET['user'];?>",
success: function(data) {
$('#summary').html(data);}
});
}