You need to interface with server side scripting using the

  • server: object representing Tango Server.
  • getVariable(name): gets Tango a variable. Using default scoping rules, returns variable value.
  • getVariable(name, scope): as in the previous paragraph, but defined with scope.
  • setVariable(name, value): sets a Tango variable, using default scoping rules, returns nothing.
  • setVariable(name, value, scope): as in the previous paragraph, but with defined scope.

as noted in help for <@SCRIPT>

you need to change it to...

<@ASSIGN request$ScriptIn VALUE='Your Value Here'>

<@SCRIPT SCOPE="Request">
var d = server.getVariable('ScriptIn', 'Request');
function pd1(d)
{
if(d.charAt(0)==0) {
nd = d.toString().charAt(1);
server.setVariable('wnd',nd, 'local');
}
else
{
nd = d.toString();
server.setVariable('ScriptOut',nd, 'Request');
}
}
</@SCRIPT>
@@request$ScriptOut

Ben Johansen - http://www.pcforge.com
-Authorized WiTango Reseller
 http://www.pcforge.com/WitangoGoodies.htm
-Authorized Alt-N Reseller
 http://www.pcforge.com/AltN.htm

-----Original Message-----
From: Bryan Hughes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 8:31 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: <@SCRIPT> generating UNDEFINED

Using code below in a TAF returns undefined.

<@SCRIPT SCOPE="Request">
function pd1(d) {
if(d.charAt(0)==0) {
nd = d.toString().charAt(1);
return nd;
} else {
nd = d.toString();
return nd;
}
}
</@SCRIPT>
<br>
<@SCRIPT EXPR="pd1('01')">

The results are:

undefined
1

Am I misunderstanding the abilities of the Witango server side _javascript_?

I'm on Witango Win 5.0.1.054
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to