Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1746

gecko: ajax javascript reference rendering problem

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-M2
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      Hi,

      i tried render the javascript as:

      public void renderHead(IHeaderResponse response) {
      response.renderJavascriptReference(contextPath + "js/test.js");
      }

      The test.js is in webapp/js/test.js (out of classpath). All works greatly in Opera but in FF (gecko) is there a problem in wicket-ajax.js (the code is form trunk version):

      836: if (Wicket.Browser.isGecko()) {
      837: var href = document.location.href;
      838: var lastIndexOf = href.lastIndexOf('/');
      839: if (lastIndexOf > 0)
      840:

      { 841: url = href.substring(0,lastIndexOf+1) + url; 842: }

      843:}

      Why is there this fix/workaround? This works only for relative path but for absolute is this code broken.

        Attachments

          Activity

            People

            • Assignee:
              knopp Matej Knopp
              Reporter:
              hell Jan Loose
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: