Note that there are some explanatory texts on larger screens.

plurals
  1. POjavascript:document.forms[0].submit() does not work with IE10
    primarykey
    data
    text
    <p>My Code:</p> <pre><code>&lt;form method="post" action="PreDischargeEducation.aspx" id="form1"&gt; &lt;div class="aspNetHidden"&gt; &lt;input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" /&gt; &lt;input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /&gt; &lt;input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /&gt; &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/lots of stuff here" /&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; //&lt;![CDATA[ var theForm = document.forms['form1']; if (!theForm) { theForm = document.form1; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //]]&gt; &lt;/script&gt; &lt;div class="aspNetHidden"&gt; &lt;input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBgKblbSKDQLWxZaxDwK+n5yTDgKN97n9CAL1m+DgCwKZseiDBoE7ceDrS0JTSg/qHRKRiCdcZ+nF2M69ovt+U0TvDhOh" /&gt; &lt;/div&gt; </code></pre> <p>Then at the bottom I have</p> <pre><code>&lt;a class="box" href="javascript:document.forms[0].submit()"&gt;Submit &amp;amp; Continue...&lt;/a&gt; </code></pre> <p>However, the button does not go. Is the forms[0] not usable in IE10?</p> <p>Also, when I use the Return key in the field to submit, the data does not seem to be going to the backend ASP.NET code. Is my JavaScript bad? Works fine in other browsers.</p> <p>EDIT: The tag is after the in the real code.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload