Wicket
  1. Wicket
  2. WICKET-1535

ExternalLink JavaScript not working in FF 3

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.3
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      WinXP; Firefox 3.0 Beta 5

      Description

      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Gwyn Evans
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development