I do indeed.
I thought it was something to do with the innerHTML statement, so I tried doing:
if (xmlhttp.readyState==4 && xmlhttp.status==200)
document.getElementById("content").innerHTML += xmlhttp.responseText;
by adding the + to the = sign, I presumed it would append to the content div. But it re-writes another table if I click the ASC or DESC links. This happens because everytime the ajax is called, my php file writes a new table each time so obviously what I did was wrong. I've got the functionality, if I click ASC it orders them alphabetically and if I click DESC, it reverses the data results, the only issue is with the links disappearing.
If I can sort that out I've pretty much solved my problem.
How can I fix this?