Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML - I cannot write in some textboxes shown dynamically by javascript in internet explorer
    primarykey
    data
    text
    <p>I have 2 forms on my page. </p> <p>The first one is always visible and the second one is hidden at first. </p> <p>When the user clicks a specified radio option, the second form shows up. </p> <p>In Chrome and Firefox, everything is fine, but in IE, the form shows, but I cannot write inside the textboxes fields. </p> <p>The wierdest thing is that I can erase everything inside the textboxes but I cannot add anything.</p> <p>Here is some code:</p> <p>The first form:</p> <pre><code>&lt;form name="calendar" action="" method="post"&gt; &lt;input type="text" name="n" /&gt; &lt;input type="radio" name="t" value="0" onclick="showSecondForm();" /&gt;Option 1 &lt;input type="radio" name="t" value="1" onclick="showSecondForm();" /&gt;Option 2 &lt;input type="radio" name="t" value="2" onclick="showSecondForm();" /&gt;Option 3 &lt;input type="submit" name="submit" value="Submit" onclick="onSubmitAction();return false;"&gt; &lt;/form&gt; </code></pre> <p>The function showSecondForm() checks if option 3 is checked and if so, it shows the second form.</p> <p>The second form is:</p> <pre><code>&lt;div id="customForm" style="display: none;"&gt; &lt;form name="custom" action="" method="post"&gt; &lt;input type="text" name="a" /&gt; &lt;input type="text" name="b" /&gt; &lt;input type="text" name="c" /&gt; &lt;input type="text" name="d" /&gt; &lt;input type="text" name="e" /&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>The forms will never submit because everything I have to do is in javascript and I can reach both forms easilly. All my code is working fine except for the typing in textboxes in ie.</p> <p>My javascript</p> <pre><code>&lt;script type="text/javascript"&gt; function showSecondForm() { if(document.calendar.t[2].checked) { document.getElementById('customForm').style.display = 'block'; } else { document.getElementById('customForm').style.display = 'none'; } } &lt;/script&gt; </code></pre>
    singulars
    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