It depends on the return value of your function getcam.php, but you are probably looking for a function html():
$.ajax({
url: 'http://dowmian.com/xs1/getcam.php',
type: 'GET',
data: {id: <?php echo $cam_id; ?>},
success: function(responseText){
$('#update-div').html(responseText);
},
error: function(responseText){
}
});
If you want to add #update-divdynamically, just like before an ajax call, you can do this with append():
$('.container').append($('<div/>').attr('id','update-div'));
References
source
share