I am using wicket framework. Issue is with dynamic image, it works fine with
Firefox but the problem is with IE.
i have method settimeout, images are laoding with dynamic action in IE and
FF, but it is not going to next page.
static private class SafeSubmitBehaviour extends AbstractBehavior{
public void onRendered( Component component ) {
super.onRendered( component );
StringBuffer buffer = new StringBuffer(200);
buffer.append("<script type=\"text/javascript\" >\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}]]>*/</script>");
component.getResponse().write(buffer);
}
}
Here I also tried with adding function after setTimeout, but no use.
HTML code:
<div id="toHide" class="pb-text-align-center">
<img style="display: inline"
src="img/load.gif" />
<form wicket:id="safeForm"
class="clearfix">
<input type="hidden"
wicket:id="submitted" value="false" />
</form>
</div>
how can i solve this? My issue is image with animation is not working IE,
but working fine with FF.
Java script funtion from html view source:
if (document.getElementById("safeForm4d").submitted.value == "false") {
document.getElementById("safeForm4d").submitted.value = "true";
setTimeout(function(){'document.getElementById("safeForm4d").submit()'},
100);
}else{
document.getElementById("toHide").style.display="none";
}