[ https://issues.apache.org/jira/browse/WICKET-6307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15827730#comment-15827730 ]
Sven Meier commented on WICKET-6307: ------------------------------------ I'd prefer `if (typeof ff.onsubmit === "function")`. > SubmitLink does not work in Chrome "ff.onsubmit is not a function" > ------------------------------------------------------------------ > > Key: WICKET-6307 > URL: https://issues.apache.org/jira/browse/WICKET-6307 > Project: Wicket > Issue Type: Bug > Affects Versions: 7.3.0, 7.6.0 > Environment: Windows > Reporter: Robert Handschmann > Assignee: Sven Meier > > Submitting a form with a SubmitLink doesn't work in Google Chrome because of > the JavaScript error "ff.onsubmit is not a function". > The generated html is like > {noformat} > <form id="memberGetMemberForm" class="standard_form" role="form" > wicketpath="memberGetMemberForm" method="post" > action="./?-1.IFormSubmitListener-memberGetMemberForm"><div > style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input > type="hidden" name="memberGetMemberForm_hf_0" id="memberGetMemberForm_hf_0" > /></div> > ... > <a href="javascript:;" id="mgmSend" wicketpath="memberGetMemberForm_mgmSend" > onclick="var e=document.getElementById('memberGetMemberForm_hf_0'); > e.name='mgmSend'; e.value='x';var > f=document.getElementById('memberGetMemberForm');var ff=f;if (ff.onsubmit != > undefined) { if (ff.onsubmit()==false) return false; > }f.submit();e.value='';e.name='';return false;"> </a> > ... > </form> > {noformat} > Error in Chrome console: > {noformat} > (index):58 Uncaught TypeError: ff.onsubmit is not a function > at HTMLAnchorElement.onclick ((index):58) > onclick @ (index):58 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)