This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If you a new and are just practicing, then it would be a lot better if you could change your server side code to return formatted HTML which you could just directly use - with something like document.getelementById("myDiv").innerHTML = response.text().
You might also consider starting with a java script library like Jquery which would save you a lot of hassle which browser compatibility issues.