You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Leangen <dl...@canada.com> on 2005/05/16 17:01:13 UTC
[Client-side scripting] onRezise()
I just discovered client-side scripting with Tapestry.
Very nice!!
I am now going to use it extensively.
However, I am having one problem: I can't figure out how to implement the
onResize() that usually works with the body tag:
<body onResize="someFunction()">
...
</body>
I tried, both in the <body> and the <initialization> sections:
window.onResize = function () { someFunction() };
and
document.body.onResize = function () { someFunction() };
I've tried playing around with these in quite a few different ways, but
can't seem to get it to work.
Can anybody tell me how this works?
Thanks!
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: [Client-side scripting] onRezise()
Posted by David Leangen <dl...@canada.com>.
> <body jwcid="@Body" onResize="doSomething();">
> The value of onResize can also be an ognl expression if you want that...
Ok, simple enough.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: [Client-side scripting] onRezise()
Posted by Andreas Andreou <an...@di.uoa.gr>.
David Leangen wrote:
>I just discovered client-side scripting with Tapestry.
>Very nice!!
>I am now going to use it extensively.
>However, I am having one problem: I can't figure out how to implement the
>onResize() that usually works with the body tag:
><body onResize="someFunction()">
> ...
></body>
>I tried, both in the <body> and the <initialization> sections:
> window.onResize = function () { someFunction() };
>and
> document.body.onResize = function () { someFunction() };
>
>
>
Well, I usually use the Body component for outputing the body tag, so I
can just use:
<body jwcid="@Body" onResize="doSomething();">
The value of onResize can also be an ognl expression if you want that...
>I've tried playing around with these in quite a few different ways, but
>can't seem to get it to work.
>
>
>Can anybody tell me how this works?
>
>
>Thanks!
>
>Dave
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: [Client-side scripting] onRezise()
Posted by David Leangen <dl...@canada.com>.
Hi, Bryan,
Thanks for the suggestion. So, you're suggesting that this can only be done
outside of the Tapestry scripting framework?
If so, I'll give that a try. IIUC (I don't know the internals of javascript
all that well) the contents of doSomething() will only be evaluated at
runtime, so I can still make references to functions that have not yet been
defined. All the stuff that it refers to will only be defined *after* the
body tag, as per the Tapestry approach to scripting. If that is the case,
and Tapestry doesn't support the onResize event, then I guess your approach
is the only way.
Cheers,
Dave
> -----Original Message-----
> From: Bryan Lewis [mailto:bryan@maine.rr.com]
> Sent: 17 May 2005 22:55
> To: Tapestry users; dleangen@canada.com
> Subject: Re: [Client-side scripting] onRezise()
>
>
> How about this:
>
> <script type="text/javascript">
> function doSomething() { alert("got here"); }
> </script>
>
> <body jwcid="@Body" onresize="doSomething();">
>
>
>
> ----- Original Message -----
> From: "David Leangen" <dl...@canada.com>
> To: <ta...@jakarta.apache.org>
> Sent: Monday, May 16, 2005 11:01 AM
> Subject: [Client-side scripting] onRezise()
>
>
> >
> > I just discovered client-side scripting with Tapestry.
> >
> > Very nice!!
> >
> >
> > I am now going to use it extensively.
> >
> >
> > However, I am having one problem: I can't figure out how to
> implement the
> > onResize() that usually works with the body tag:
> >
> > <body onResize="someFunction()">
> > ...
> > </body>
> >
> >
> > I tried, both in the <body> and the <initialization> sections:
> >
> > window.onResize = function () { someFunction() };
> >
> > and
> >
> > document.body.onResize = function () { someFunction() };
> >
> >
> > I've tried playing around with these in quite a few different ways, but
> > can't seem to get it to work.
> >
> >
> > Can anybody tell me how this works?
> >
> >
> > Thanks!
> >
> > Dave
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: [Client-side scripting] onRezise()
Posted by Bryan Lewis <br...@maine.rr.com>.
How about this:
<script type="text/javascript">
function doSomething() { alert("got here"); }
</script>
<body jwcid="@Body" onresize="doSomething();">
----- Original Message -----
From: "David Leangen" <dl...@canada.com>
To: <ta...@jakarta.apache.org>
Sent: Monday, May 16, 2005 11:01 AM
Subject: [Client-side scripting] onRezise()
>
> I just discovered client-side scripting with Tapestry.
>
> Very nice!!
>
>
> I am now going to use it extensively.
>
>
> However, I am having one problem: I can't figure out how to implement the
> onResize() that usually works with the body tag:
>
> <body onResize="someFunction()">
> ...
> </body>
>
>
> I tried, both in the <body> and the <initialization> sections:
>
> window.onResize = function () { someFunction() };
>
> and
>
> document.body.onResize = function () { someFunction() };
>
>
> I've tried playing around with these in quite a few different ways, but
> can't seem to get it to work.
>
>
> Can anybody tell me how this works?
>
>
> Thanks!
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org