Ok, I read this thread to figure out how to generate HTML with JavaScript. I attempted doing it with the following script:
<script type='text/javascript'>
function generate_page() {
    var x = 0;
    var y = 0;
    var lines = 20;
    var output;
    while (x < lines) {
        while( y < lines*2){
            output = ("<div id='x" + x + "_" + y + "'>x</span>");
            $('board').prepend(output);
            y++;
        }
        y = 0;
        x++;
        $('board').append('<br />');
    }
}
</script>
</head>
<input type='button' value='test' onClick='generate_page()'>
<body>
<div id='board'>
</div>
</body>
</html>
It doesn't return any errors but just simply doesn't do anything. What am I doing wrong?
 
     
     
     
     
    