Alrighty. So it's been a while since i've worked with Ajax/json/jquery/javaeverything and I caot for the life of me remember how to "reset" a div/wipe the buffer after ruing a json/ajax function.
Case in point: I've got a button that is effected by ajax function, the code is below.
function CMA(id)
{
$('#capture').on('click',function(){
$.ajax({
url:'cma.php',
type:"POST",
data:{sid:id,uid:uid},
dataType:"json",
success: function(data) {
if(data.status == 'attack')
{
$('#capture').fadeOut('slow',function(){
$(this).html('CAPTURING').prop('disabled',true).fadeIn('slow')});
}
}
})
});
}
It is directly effecting this bit of code
$html .="<table>
<tr>
<th colspan='2'>Star Information</th>
</tr>
<tr><th>Star ID</th><td id='starID'></td></tr>
<tr><th>Current Owner</th><td id='owner'></td></tr>
<tr><th colspan='2'><button id='capture'>CAPTURE</button></th></tr>
</table>";
($html is echoed else where but that's a lenghty bit of code) The information in the starID information will change, so does the owner information (as far as I can tell). However, the CAPTURE button will not change back. as I've said, It's been a while since i've worked with anything java, so if this is something super obvious, i apologize -- but my google foo is failing me spectacularly and my brain is ruing solely off mountain dew and pringles.
