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

Javascript error when loading datepicker

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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.

        Attachments

        1. datepicker_javascript.patch
          1.0 kB
          Frank Klein Koerkamp

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: