set time out in JavaScript
<p>Firefox always loads dynamic images, but IE it just shows images without any dynamic action. what changes I need to do?</p>

<p>JavaScript code from IE view source code:</p>

<pre><code>&lt;script type=”text/javascript”
    &lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/ 
    if (document.getElementById("safeForm1d3").submitted.value == "false") { 
      document.getElementById("safeForm1d3").submitted.value = "true"; 
      setTimeout('document.getElementById("safeForm1d3").submit()', 100); 
    }else{ 
    document.getElementById("toHide").style.display="none"; 
    }/*--&gt;]]&gt;*/
&lt;/script&gt;
</code></pre>

<p>I am using Wicket framework, so real java code is:</p>

<pre><code> static private class SafeSubmitBehaviour extends AbstractBehavior{
    public void onRendered( Component component ) {
      super.onRendered( component );      
      StringBuffer buffer = new StringBuffer(200);
      buffer.append("&lt;script type=\"text/javascript\" &gt;&lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/\n");
      buffer.append("if (document.getElementById(\"").append(component.getMarkupId()).append("\").submitted.value == \"false\") {\n");
      buffer.append("document.getElementById(\"").append(component.getMarkupId()).append("\").submitted.value = \"true\";\n");
      buffer.append("setTimeout('document.getElementById(\"").append(component.getMarkupId()).append("\").submit()', 100);\n}else{\n");
      buffer.append("document.getElementById(\"toHide\").style.display=\"none\";\n}/*--&gt;]]&gt;*/&lt;/script&gt;");      
      component.getResponse().write(buffer);
    }  
  } 
</code></pre>

<p>html page which loads my dynamic image is:</p>

<pre><code>&lt;div id="toHide" class="pb-text-align-center"&gt;
        &lt;img style="display: inline" src="img/load.gif" /&gt;
            &lt;form wicket:id="safeForm" class="clearfix"&gt;
            &lt;input type="hidden" wicket:id="submitted" value="false" /&gt;
        &lt;/form&gt;
&lt;/div&gt;
</code></pre>
