I use server-side JavaScript, for validation and other server-side processing not available in Tango, and it is reliable. Here is an snippet which passes the value+scope for each argument, rather then hard coding the called function for predefined variable scope. But it works either way. If you have more args, you have to do (1) for each one; (2) only for the variables needed back in the calling code.
=================================== <@script SCOPE=request> function replaceExtension( arg, argScope ) { // (1) get the arg ( first arg is value, second is its scope) var myStr = server.getVariable( arg, argScope ); // do whatever Javascript processing you want myStr = myStr.substring(0,(myStr.length-3)) + "JPG"; // (2) make the variable available to the caller; server.setVariable( arg, myStr, argScope ); return ''; } ''; </@script> <@assign domain$name "filename.ext"> Before= @@domain$name<br> <@script Scope=request EXPR="replaceExtension( 'name','domain' )"> After= @@domain$name<br> <@purge domain$name> ======================================= - Mihai. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 17:04 To: [EMAIL PROTECTED] Subject: Witango-Talk: server side javascript? Hi, I'm a Witango user that use extensively tcf, but I know (but don't use it at this time) that there is a serverside implementation of javascript useable under <@script>/@script Now, I've problems with tcf that can be solved with a object language such as javascript, but I don't know if the implementation of javascript is robust enough. Does anyone will be cool enough to leave me some snippet of : <@script><@comment>with please</@comment></@script> Thanks alot and my 2 cent's ;) Gauthier PS: Also, does the javascript run with DOM? PPS: I've also some problems with .tcf, but can't describe them at this time... _____________________________________________________________________ Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf