How to replace html with other html with javascript

Hey, I am trying to figure out how to replace something with javascript, instead of just add something underneath what I already have. To explain this better, I have my site set up:

So, when you enter your email, it checks if it is valid, and then it sends the email, but underneath the text input box, it displays the text “thank you for your interest… bla bla bla”

I would like to know if it is possible to instead of add that text at the bottom, to simply replace the the form that is above it.

Here is the javascript code to insert it.

getResponse: function(transport) {
	var newData = transport.responseText;

yes it’s possible, but it will require someone who works with the Prototype library to properly advise.