You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Waimun Yeow <wa...@dev.java.net> on 2006/05/11 16:07:59 UTC
Override window.onload function
Hi.
I am using the default @DatePicker in one of the html pages where I have a
window.onload function declared in the <head> tags.
Since using @DatePicker requires @Body, my window.onload function is
replaced by the DatePicker script that initializes the javascript calendar
object.
1. How do I append my onload function to the onload function added by the
DatePicker?
2. Also, how do I also specify a different format (MM/dd/yy) for the date
instead of the default (dd MMM yyyy).
Thanks,
waimun
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Override window.onload function
Posted by Andreas Idl <an...@ev-i.at>.
Hi
1. You can include a @Script component. If you put your javascript in the
<initialization> tag, it will be executed on onload.
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/Script.html
2. The datepicker has parameter translator. I think it should do what you
want.
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/DatePicker.html
Andreas
On Thursday 11 May 2006 16:07, Waimun Yeow wrote:
> Hi.
>
> I am using the default @DatePicker in one of the html pages where I have a
> window.onload function declared in the <head> tags.
>
> Since using @DatePicker requires @Body, my window.onload function is
> replaced by the DatePicker script that initializes the javascript calendar
> object.
>
> 1. How do I append my onload function to the onload function added by the
> DatePicker?
>
> 2. Also, how do I also specify a different format (MM/dd/yy) for the date
> instead of the default (dd MMM yyyy).
>
>
> Thanks,
>
> waimun
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org