You can�t assign the results of a javascript method to a velocity variable.
Velocity-files are processed on the server side, while javascript is
running on
the client. So, first your velocity file is processed an transfered to the
client and
than the javascript is processed on the client. The only chance to get
something
back from the client is to set a field an transmit a form or to add the
results to a link with
parameters witch can be scanned by turbine.
/uwe
"Keshava Murthy"
<[EMAIL PROTECTED] An: "Turbine Users List"
<[EMAIL PROTECTED]>
g> Kopie:
Thema: javascript
14.11.2002 09:27
Bitte antworten
an "Turbine Users
List"
Hi,
I need display a clock as a label using javascript in my vm file. for this
I
have to assign a javascript variable to variable declared in vm file using
#set method.
Could somene give me the proper syntax for the this. Given below is my
javascript file. I need to assign the variable tDate to the variable $clock
in UpdateClock() function.
<script language="JavaScript">
var clockID = 0;
function UpdateClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}
var tDate = new Date();
var tDate=tDate.getSeconds();
clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
clockID = setTimeout("UpdateClock()", 500);
}
function KillClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}
}
</script>
regards,
Keshava Murthy. S
--
To unsubscribe, e-mail: <
mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:turbine-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>