[ 
https://issues.apache.org/jira/browse/WICKET-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xiefei updated WICKET-1448:
---------------------------

    Description: 
<form id="wicketForm"><a href="#" wicket:id="submitLink">submit</a></form>

if:
        
response.renderOnDomReadyJavascript("jQuery('#"+component.getMarkupId()+"').submit(function(){alert('x');return
 false;})");

the alert will not show when submitLink is clicked, and the form is submitted

if: 
        
response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
 = function(){alert('x');return false;}");

the alert will show and the form is not submmitted


  was:
<form id="wicketForm"><a href="#" wicket:id="submitLink">submit</a></form>

if:
        
response.renderOnDomReadyJavascript("jQuery('"+component.getMarkupId()+"').submit(function(){alert('x');return
 false;})");

the alert will not show when submitLink is clicked, and the form is submitted

if: 
        
response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
 = function(){alert('x');return false;}");

the alert will show and the form is not submmitted



> SubmitLink bypass jquery submit eventhandler
> --------------------------------------------
>
>                 Key: WICKET-1448
>                 URL: https://issues.apache.org/jira/browse/WICKET-1448
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: xiefei
>
> <form id="wicketForm"><a href="#" wicket:id="submitLink">submit</a></form>
> if:
>         
> response.renderOnDomReadyJavascript("jQuery('#"+component.getMarkupId()+"').submit(function(){alert('x');return
>  false;})");
> the alert will not show when submitLink is clicked, and the form is submitted
> if: 
>         
> response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
>  = function(){alert('x');return false;}");
> the alert will show and the form is not submmitted

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to