Javascript onclick left at "Connecting..." in browser tab
<p>First time asking a question here.</p>

<p>I have two simple Javascript functions that 1. Generates a random letter, and 2. Populates a 10x10 table with a single letter in each cell. The main function that creates the table is called through a simple HTML button with an onclick and it looks like this:</p>

<pre><code>function BGen()
{
    var board = "&lt;table border='0' width='300' cellpadding='3'&gt;";
    for (h = 1; h &lt;= 10; h++) {
        board = board + "&lt;tr&gt;";
        for (v = 1; v &lt;= 10; v++) {
            board = board + "&lt;td&gt;" + RLGen() + "&lt;/td&gt;";
        }
        board = board + "&lt;/tr&gt;";
    }
    board = board + "&lt;/table&gt;";
    document.write(board);
}
</code></pre>

<p>For some reason, when the button is clicked, the table is generated as it should be, but the browser is left sitting on "Connecting..." afterward, as if it's waiting for something else.</p>

<p>Can anybody possibly shed some light on this? I haven't a clue why it's doing so.</p>

<p>Thanks in advance.</p>
