[ http://issues.apache.org/jira/browse/MYFACES-569?page=all ]

Paul Klaer updated MYFACES-569:
-------------------------------

    Attachment: HtmlCalendarRenderer.java
                popcalendar.js

This problem occures because the old JavaScript is executed in Firefox before 
the body tag "onload" is set during the render phase.
So this variable "var jscalendarOnloadBackup = window.onload;" is only set to 
"undefined" and never with the old onload script.

To solve this problem I rewrote the load script as a function in the 
"popcalendar.js" and this function is then called just before 
"jscalendarSetImageDirectory" is called inside the enclosing "body" element. At 
this time the "onload" tag of the "body" element is set.

You can test this if you change the "<body>" element to "<body 
onload="alert('test body onload');">" of the "simple/calendar.jsp" example..

Regards,

Paul 

> x:inputCalendar: onload overriding does not work in Firefox and popup 
> calendar window does not open
> ---------------------------------------------------------------------------------------------------
>
>          Key: MYFACES-569
>          URL: http://issues.apache.org/jira/browse/MYFACES-569
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>     Reporter: Paul Klaer
>  Attachments: HtmlCalendarRenderer.java, popcalendar.js
>
> The onload overriding does not work in Firefox. You can test it by simple 
> adding of "<body onload="alert('test')"">.
> If the onload is set in the html document the x:inputCalendar popup window 
> does not open and the variable "jscalendarBPageLoaded" still remains with the 
> default value "false". The popup calendar window is then never shown.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to