document.write text over multiple lines
<p>I have a script that takes an input string from a user with variable length, typically ~ 400-3000 letters.
My script does some modification to the string, and then should print it to the screen.
Using document write, everything appears on one line. However, I want to have ~ 100 letters for each output line, so the user won't have to scroll ~ 3000 letters to the right to see the whole text.</p>

<p>The only way I could imagine to do this would be a for loop, but maybe someone know a better solution?</p>

<p><strong>Edit:</strong></p>

<p>This is the for loop I am currently using to achieve this</p>

<pre><code>document.write("&lt;p&gt;","&gt;Position: ", (lower+1) + "-" + (lower +print_screen.length), "&lt;br/&gt;");

// print only 70 chars per line
for(i = 0; i &lt; print_screen.length; i += 69){
    document.write(print_screen.substring(i, i+69), "&lt;br/&gt;");
};

document.write("&lt;/p&gt;");
</code></pre>
