write the query to a textArea