velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Baughman <baugh...@utdallas.edu>
Subject Re: Can we access velocity contexts from inside javascript
Date Wed, 13 Oct 2004 18:20:30 GMT
Velocity is rendered on the server side, replacing Velocity code with
strings, not any Java or Javascript object.  The rendered template is
sent to the browser client.  When javascript attempts to work on the
client side there is no VelocityContext to work with any more.  So be
sure your rendered code already has the information javascript needs
from the Velocity context before sending it to the client.

Barbara Baughman
X2157

On Wed, 13 Oct 2004, Shankar Banerjee wrote:

> Hi ,
>
> We are using html and javascript  for rendering an UI. We are also using
> struts and velocity to interface with the UI. When we reference velocity
> contexts within just the html part of the UI page , it works fine. However
> when we try to access the same contexts from inside the javascript function,
> its giving an error that it cannot recognize the object. I would appreciate if
> somebody in this group can enlighten me.
>
> Thanks
> -Shankar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message