I am making a page where users can answer questions (using radio buttons) about a product they are selling back. When they hit a button at the bottom of the page, a price quote
There is no issue with document.write
, it is doing exactly what it is supposed to do:
Overwrite the page with the new content.
If you do not want to do that, then you have to give it some context to write to.
For example:
function getQuote(){
var textArea = document.getElementById('textArea');
textArea.innerHTML = "Your Quote Is: $", price, ".00";
}
Which puts whatever your text is into a DOM element with id="textArea"