i have jquery, but it is not going to next page, it always display images and waits, never proceed to next page.
HTML code:
There is no id named 'safeForm15' in your HTML, which is what your setTimeout is trying to select. In fact, the form has ID namespaced, which I believe is illegal to begin with.
Regardless, the quick fix is to cue off of 'toHide', and get rid of the component.getMarkupId bit.
$('#toHide').find('form').submit();
Added:
You need to change this:
buffer.append(" setTimeout(function(){ $(\"#").append(component.getMarkupId()).append("\").submit()}, 100);\n");
to this:
buffer.append(" setTimeout(function(){$('#toHide').find('form').submit();}, 100);\n");