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

Javascript error when loading datepicker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.18
    • 1.4.20
    • wicket-datetime
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: