Add text to Text Widget using Javascript

Where are you using document.write? Inside the text widget? If so, it should write text inside that widget, just like you want.

document.write injects data where it’s encountered. So if you’re using it outside the document body it will produce unexpected results (like overwrite the document, in most cases).

**Update, add this in your text widget:

 <div id="textwidget-content"> YOUR INITIAL TEXT HERE </div>
 <script type="text/javascript">
   var strings = new Array('Whatever', 'Bla blah', 'Boo', '....');
   var t = setInterval(function(){
     document.getElementById('textwidget-content').innerHTML = strings[Math.floor(Math.random()*(strings.length))];}, 1000);
 </script>