Javascript error when loading datepicker
----------------------------------------

                 Key: WICKET-4159
                 URL: https://issues.apache.org/jira/browse/WICKET-4159
             Project: Wicket
          Issue Type: Bug
          Components: wicket-datetime
    Affects Versions: 1.4.18
         Environment: All browsers
            Reporter: Frank Klein Koerkamp
            Priority: Minor
         Attachments: datepicker_javascript.patch

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.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to