velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis <brede...@mac.com>
Subject Re: #SET assign javascript returnvalue to a variable ??
Date Thu, 20 Mar 2003 15:47:00 GMT
Leina,

The javascript function doesn't exist as far as Velocity is 
concerned... It exists only in the user's browser, not on the server.

This is what happens when the page is rendered:

.vm template ->--- Velocity ---> .html document ->--- Web browser ---> 
displayed page

The javascript is interpreted by the Web browser, that is why you can't 
use the javascript function in your template.

Cheers,
-- Denis.


On Thursday, March 20, 2003, at 03:32  pm, Leina Last wrote:

>
> Hi
>
> I have a javascript function that returns a String value. Is there a 
> way to assign that value to a velocity variable? I tried the 
> following, but get a error:
>
> #set ( $newValue = getJavascriptFunction() )
>
> #set ( $newValue = $getJavascriptFunction() )
>
> Thanks
>
> L
>


---------------------------------------------------------------------
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