我有jquery,但它不会进入下一页,它总是显示图像并等待,永远不会进入下一页。
i have jquery, but it is not going to next page, it always display images and waits, never proceed to next page.
HTML code:
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>HTML查看来源:
<SCRIPT type="text/javascript"> var $ = jQuery.noConflict(); $('.toHide').show().doTimeout(100,function() { $('.toHide').find('safeForma3').submit();}); </SCRIPT>wicket代码:
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("var $ = jQuery.noConflict();\n "); buffer.append(" $('.toHide').show().doTimeout(100,function() { $('.toHide').find('"); buffer.append(component.getMarkupId()).append("').submit();});\n</script>"); component.getResponse().write(buffer); } } buffer.append(component.getMarkupId()).append("').submit();});\n</script>");我尝试过:$('。toHide')。find('form')。submit ();});.但仍然没有用。
i have tried with: $('.toHide').find('form').submit();});. But still no use.
将$('。toHide')转换为$('#toHide')后,页面将进入下一页,但动画未发生在IE6 / 7中,它在FF中工作正常。
After chaging $('.toHide') to $('#toHide'), page is going ot next page, but animation is not happening in IE6/7, it works fine in FF.
推荐答案我认为你应该试试这个:
I think you should try this:
$('#toHide').find('form').submit();或者如果表格上有ID(我不熟悉Wicket)你可以使用:
Or if the form has an ID on it (I'm not familiar with Wicket) you can just use:
$('#safeForm').submit();ID选择器使用'#'字符,而不是'。',它是类选择器前缀。
The ID selector uses a '#' charactor, not a '.', which is the class selector prefix.
更多推荐
jquery没有进入下一页
发布评论