[ 
https://issues.apache.org/jira/browse/WICKET-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610861#action_12610861
 ] 

Timo Rantalaiho commented on WICKET-1535:
-----------------------------------------

I'm not sure but a bit suspicious about the implications of adding "; return 
false;", so maybe another kind of fix should be looked for. 

Have you googled about why this behavior changed from Firefox 2 to 3?

> ExternalLink JavaScript not working in FF 3
> -------------------------------------------
>
>                 Key: WICKET-1535
>                 URL: https://issues.apache.org/jira/browse/WICKET-1535
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>         Environment: WinXP; Firefox 3.0 Beta 5
>            Reporter: Gwyn Evans
>            Priority: Minor
>             Fix For: 1.4-M4
>
>
> If the link target isn't a proper anchor, the code generates a JS on-click 
> handler, i.e. 
>    tag.put("onclick", "window.location.href='" + url + "';");
> which generates code such as 
>   onclick='window.location.href="http://news.bbc.co.uk";;'
> The problem is that when this is used with a button /in a form/, while this 
> works with IE & FF2, it appears that FF3 needs a 'return false;' at the end 
> of the JS before it works, otherwise it just treats the button as a 'submit' 
> action.
> So, is there any down-side to changing the above line in 
>   \org\apache\wicket\markup\html\link\ExternalLink.java
> to be 
>   tag.put("onclick", "window.location.href='" + url + "'; return false;"); ?
> /Gwyn

-- 
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