velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <d...@solaraccess.com>
Subject Re: <input type="hidden" value=getYear()>
Date Tue, 14 Oct 2003 15:40:31 GMT
On Tue, 2003-10-14 at 05:48, Leina Last wrote:
> Will appreciate if someone can help.
> I can't manage to get the value "2003" in <input type="hidden" value=getYear()>
from javascript if I have something like:
> 
> function getYear() {
> return 2003;
> }
> 
> <form name="001" method="post" action="$link.setPage("002.vm")">
> <input type="hidden" name="START_YEAR" value=getYear()>
> <input type="submit">
> <form>
> 
> Java:
>  String year = data.getParameters().getString("START_YEAR");

I don't think you can just put a plain javascript call into HTML and
have it work. You have to put it in script tags, like:

<script language="JavaScript">getYear();</script>

or something like that, right? Otherwise the page renderer doesn't have
any way of knowing it should do anything special with it.

Dave



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