Javascript form function submit not auto submitting
<p>Javascript function ASP <code>&lt;body onload="form1.submit();"&gt;</code> is not submitting the form below once the page have loaded.</p>

<pre><code>    &lt;script type="text/javascript"&gt;
        $(function() {
            var count = 20;
            $.extend($.wordStats.stopWords, {'retrieved': true, '2007': true});
            $.wordStats.computeTopWords(count);
   var msgsubmit = '&lt;input type="submit" name="button" id="button" value="Submit" /&gt;'
   var msgform = '&lt;html&gt;&lt;body onload="form1.submit();"&gt;&lt;form id="form1" name="form1" method="post" action="get_page_2.asp"&gt;\n'
            var msg = 'Keywords: &lt;textarea name="g_seo_no_keywords" id="g_seo_no_keywords" cols="120" rows="3"&gt;';
   var msgend = '&lt;/textarea&gt;\n';
   var msgg_seo_no_title = '&lt;input type="text" name="g_seo_no_title" id="g_seo_no_title" value="title" /&gt;'
   var msgg_seo_no_title_count = '&lt;input type="text" name="g_seo_no_title_count" id="g_seo_no_title_count" value="0" /&gt;'
   var msgg_seo_no_keywords_count = '&lt;input type="text" name="g_seo_no_keywords_count" id="g_seo_no_keywords_count" value="0" /&gt;'
   var msgg_page_no = '&lt;input type="text" name="g_page_no" id="g_page_no" value="&lt;%=(Request.Form("g_page_no"))%&gt;" /&gt;'
   var msgg_page_site = '&lt;input type="text" name="g_page_site" id="g_page_site" value="&lt;%= Request.Form("g_page_site") %&gt;" /&gt;'
   var msgg_page_url = '&lt;input type="text" name="g_page_url" id="g_page_url" value="&lt;%= Request.Form("g_page_url") %&gt;" /&gt;'
   var msgcounttext = 'Word Count: &lt;input type="text" name="g_seo_no_description_count" id="g_seo_no_description_count" value="&lt;%= counttext %&gt;" /&gt;\n';
   var msgg_seo_no_textcount = 'Word Count: &lt;input type="text" name="g_seo_no_textcount" id="g_seo_no_textcount" value="&lt;%= counttext %&gt;" /&gt;\n';
   var msgcounttext1 = '&lt;textarea name="g_seo_no_description" id="g_seo_no_description" cols="120" rows="15"&gt;&lt;%=completehtml%&gt;&lt;/textarea&gt;\n'
            for(var i = 0, j = $.wordStats.topWords.length; i &lt; j &amp;&amp; i &lt;= count; i++) {
               msg += $.wordStats.topWords[i].substring(1) + ', ';
            }
   var msgformend ='&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;\n'
            document.write(msgform)+document.write(msg)+document.write(msgend)+document.write(msgg_page_no)+document.write(msgg_page_site)+document.write(msgg_page_url)+document.write(msgg_seo_no_textcount)+document.write(msgg_seo_no_title)+document.write(msgg_seo_no_title_count)+document.write(msgg_seo_no_keywords_count)+document.write(msgcounttext)+document.write(msgsubmit)+document.write(msgcounttext1)+document.write(msgformend);
            $.wordStats.clear();
        });
        &lt;/script&gt;
</code></pre>

<p>Hi There I am hoping that someone can help me to find the solution why this form is not getting submitted when the page loads.</p>

<p>How would I go about to submit this page? It is supposed to be an autosubmit</p>

<p>Thanks</p>
