You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Christian Froelich <C....@gmx.de> on 2005/08/01 18:39:01 UTC

x:inputCalendar && Firefox && body onload

Hi,

I spent several hours playing with x:inputCalendar and wondering
why this component does not work always under Firefox. I figured out 
that x:inputCalendar doesn't work if it's inside a html-body tag 
WITH A "onload" ATTRIBUTE.
Then I always got an ugly Javascript Error:

"jscalendarCrossobj has no properties"

This for example doesn't work until you remove the onload attribute 
of the body tag:

-------------------------------------------------------------------------
<%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>
<html>
<head>
  <script type="text/javascript">
	function test(){		    
	  alert("test ALERT");
	}
  </script>	
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8">
  <title>__-- XXX --__</title>
  <link rel="stylesheet" type="text/css" href="css/basic.css">
</head>
<body onload="test();">

<f:view>
<h:form id="testForm" >
   <x:inputCalendar monthYearRowClass="yearMonthHeader"                     
                              weekRowClass="weekHeader"
     currentDayCellClass="currentDayCell" value="" renderAsPopup="true"
     title="CALTITLE" id="CAL" immediate="false" 
     style="width: 185"
   />
</h:form>
</f:view>

</body>
</html>
-------------------------------------------------------------------------

Any reasons for that??

Best Regards,

Christian

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

Re: x:inputCalendar && Firefox && body onload

Posted by Bruno Aranda <br...@gmail.com>.
> You are not using Subversion head, right?

> there is a fix for this problem checked in, so please revert to head or the nightly build.

> regards,

Ah, better :-) I detected this same issue some weeks ago but I forgot
about it completely! Thanks,

Bruno

2005/8/1, Bruno Aranda <br...@gmail.com>:
> None that I know of.  Could you open a JIRA issue with this bug?
> 
> Regards,
> 
> Bruno
> 
> 2005/8/1, Christian Froelich <C....@gmx.de>:
> > Hi,
> >
> > I spent several hours playing with x:inputCalendar and wondering
> > why this component does not work always under Firefox. I figured out
> > that x:inputCalendar doesn't work if it's inside a html-body tag
> > WITH A "onload" ATTRIBUTE.
> > Then I always got an ugly Javascript Error:
> >
> > "jscalendarCrossobj has no properties"
> >
> > This for example doesn't work until you remove the onload attribute
> > of the body tag:
> >
> > -------------------------------------------------------------------------
> > <%@ page session="false" contentType="text/html;charset=utf-8"%>
> > <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> > <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> > <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>
> > <html>
> > <head>
> >   <script type="text/javascript">
> >         function test(){
> >           alert("test ALERT");
> >         }
> >   </script>
> >   <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8">
> >   <title>__-- XXX --__</title>
> >   <link rel="stylesheet" type="text/css" href="css/basic.css">
> > </head>
> > <body onload="test();">
> >
> > <f:view>
> > <h:form id="testForm" >
> >    <x:inputCalendar monthYearRowClass="yearMonthHeader"
> >                               weekRowClass="weekHeader"
> >      currentDayCellClass="currentDayCell" value="" renderAsPopup="true"
> >      title="CALTITLE" id="CAL" immediate="false"
> >      style="width: 185"
> >    />
> > </h:form>
> > </f:view>
> >
> > </body>
> > </html>
> > -------------------------------------------------------------------------
> >
> > Any reasons for that??
> >
> > Best Regards,
> >
> > Christian
> >
> > --
> > GMX DSL = Maximale Leistung zum minimalen Preis!
> > 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
> >
>

Re: x:inputCalendar && Firefox && body onload

Posted by Bruno Aranda <br...@gmail.com>.
None that I know of.  Could you open a JIRA issue with this bug?

Regards,

Bruno

2005/8/1, Christian Froelich <C....@gmx.de>:
> Hi,
> 
> I spent several hours playing with x:inputCalendar and wondering
> why this component does not work always under Firefox. I figured out
> that x:inputCalendar doesn't work if it's inside a html-body tag
> WITH A "onload" ATTRIBUTE.
> Then I always got an ugly Javascript Error:
> 
> "jscalendarCrossobj has no properties"
> 
> This for example doesn't work until you remove the onload attribute
> of the body tag:
> 
> -------------------------------------------------------------------------
> <%@ page session="false" contentType="text/html;charset=utf-8"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>
> <html>
> <head>
>   <script type="text/javascript">
>         function test(){
>           alert("test ALERT");
>         }
>   </script>
>   <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8">
>   <title>__-- XXX --__</title>
>   <link rel="stylesheet" type="text/css" href="css/basic.css">
> </head>
> <body onload="test();">
> 
> <f:view>
> <h:form id="testForm" >
>    <x:inputCalendar monthYearRowClass="yearMonthHeader"
>                               weekRowClass="weekHeader"
>      currentDayCellClass="currentDayCell" value="" renderAsPopup="true"
>      title="CALTITLE" id="CAL" immediate="false"
>      style="width: 185"
>    />
> </h:form>
> </f:view>
> 
> </body>
> </html>
> -------------------------------------------------------------------------
> 
> Any reasons for that??
> 
> Best Regards,
> 
> Christian
> 
> --
> GMX DSL = Maximale Leistung zum minimalen Preis!
> 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
>

Re: Re: x:inputCalendar && Firefox && body onload

Posted by Martin Marinschek <ma...@gmail.com>.
Ok, I see..

It was a patch by a user, I didn't really try it out but asked the user to 
do so...

regards,

Martin

On 8/1/05, Bruno Aranda <br...@gmail.com> wrote:
> 
> Yes, I have the same problem too. Tomorrow I'll take a look at this.
> Maybe is something with my firefox deer park browser (cache, etc), and
> it works ok with konqueror and IE... Martin, I've seen the patch you
> applied last week but it does not work for me... I've just tried to
> add
> 
> <body onload="">
> 
> to the calendar.jsp in the simple tests to see if that worked, but
> I've had no luck...
> 
> regards,
> 
> Bruno
> 
> 2005/8/1, Christian Froelich <C....@gmx.de>:
> > Hi,
> >
> > I already use the latest nightly (20050731)...
> >
> > Regards,
> >
> > Christian
> >
> > --
> > GMX DSL = Maximale Leistung zum minimalen Preis!
> > 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: 
> http://www.gmx.net/de/go/dsl
> >
>

Re: Re: x:inputCalendar && Firefox && body onload

Posted by Bruno Aranda <br...@gmail.com>.
Yes, I have the same problem too. Tomorrow I'll take a look at this.
Maybe is something with my firefox deer park browser (cache, etc), and
it works ok with konqueror and IE... Martin, I've seen the patch you
applied last week but it does not work for me... I've just tried to
add

<body onload="">

to the calendar.jsp in the simple tests to see if that worked, but
I've had no luck...

regards,

Bruno

2005/8/1, Christian Froelich <C....@gmx.de>:
> Hi,
> 
> I already use the latest nightly (20050731)...
> 
> Regards,
> 
> Christian
> 
> --
> GMX DSL = Maximale Leistung zum minimalen Preis!
> 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
>

RE: Re: x:inputCalendar && Firefox && body onload

Posted by Christian Froelich <C....@gmx.de>.
Hi,

I already use the latest nightly (20050731)...

Regards,

Christian

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

Re: x:inputCalendar && Firefox && body onload

Posted by Martin Marinschek <ma...@gmail.com>.
You are not using Subversion head, right?

there is a fix for this problem checked in, so please revert to head or the 
nightly build.

regards,

Martin

On 8/1/05, Christian Froelich <C....@gmx.de> wrote:
> 
> Hi,
> 
> I spent several hours playing with x:inputCalendar and wondering
> why this component does not work always under Firefox. I figured out
> that x:inputCalendar doesn't work if it's inside a html-body tag
> WITH A "onload" ATTRIBUTE.
> Then I always got an ugly Javascript Error:
> 
> "jscalendarCrossobj has no properties"
> 
> This for example doesn't work until you remove the onload attribute
> of the body tag:
> 
> -------------------------------------------------------------------------
> <%@ page session="false" contentType="text/html;charset=utf-8"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>
> <html>
> <head>
> <script type="text/javascript">
> function test(){
> alert("test ALERT");
> }
> </script>
> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8">
> <title>__-- XXX --__</title>
> <link rel="stylesheet" type="text/css" href="css/basic.css">
> </head>
> <body onload="test();">
> 
> <f:view>
> <h:form id="testForm" >
> <x:inputCalendar monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> currentDayCellClass="currentDayCell" value="" renderAsPopup="true"
> title="CALTITLE" id="CAL" immediate="false"
> style="width: 185"
> />
> </h:form>
> </f:view>
> 
> </body>
> </html>
> -------------------------------------------------------------------------
> 
> Any reasons for that??
> 
> Best Regards,
> 
> Christian
> 
> --
> GMX DSL = Maximale Leistung zum minimalen Preis!
> 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: 
> http://www.gmx.net/de/go/dsl
>