Wicket
  1. Wicket
  2. WICKET-4159

Javascript error when loading datepicker

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.18
    • Fix Version/s: 1.4.20
    • Component/s: wicket-datetime
    • Labels:
      None
    • Environment:
      All browsers

      Description

      Javascript error in datepicker when it's loaded.

      Current check is:

      var e = Wicket.$('id815Dp'); if (e != null && typeof(e.parentNode) != 'undefined' && typeof(e.parentNode.parentNode != 'undefined')){
      e.parentNode.parentNode.removeChild(e.parentNode);
      YAHOO.wicket.id815DpJs.destroy();
      delete YAHOO.wicket.id815DpJs;

      should be like:

      var e = Wicket.$('id815Dp'); if (e != null && typeof(e.parentNode) != 'undefined' && typeof(e.parentNode.parentNode != 'undefined'))

      { e.parentNode.parentNode.removeChild(e.parentNode); YAHOO.wicket.id815DpJs.destroy(); delete YAHOO.wicket.id815DpJs; }

      I miss the brackets in the current, now you get an javascript exception on line 'YAHOO.wicket.id815DpJs.destroy(); ', because YAHOO.wicket.id815DpJs does not exist.

      1. datepicker_javascript.patch
        1.0 kB
        Frank Klein Koerkamp

        Issue Links

          Activity

          Hide
          Frank Klein Koerkamp added a comment -

          Attached patch

          Show
          Frank Klein Koerkamp added a comment - Attached patch
          Hide
          Frank Klein Koerkamp added a comment -

          Same issue but now on 1.4 branch

          Show
          Frank Klein Koerkamp added a comment - Same issue but now on 1.4 branch
          Hide
          Igor Vaynberg added a comment -

          fixed in 1.4.20. looks like its already been fixed in 1.5.x

          Show
          Igor Vaynberg added a comment - fixed in 1.4.20. looks like its already been fixed in 1.5.x

            People

            • Assignee:
              Igor Vaynberg
              Reporter:
              Frank Klein Koerkamp
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development