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/smaller>/color>
SCOPE=/color>"Request"/color>>/color>
var d = server.getVariable('ScriptIn', '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');
if(d.charAt(0)==0) {
nd = d.toString().charAt(1);
server.setVariable('wnd',nd, 'local');
}
else
{
nd = d.toString();
nd = d.toString();
server.setVariable('ScriptOut',nd, 'Request');
}
}
</@SCRIPT>/color>
@@request$ScriptOut
}
</@SCRIPT>/color>
@@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-----Using code below in a TAF returns undefined.
From: Bryan Hughes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 8:31 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: <@SCRIPT> generating UNDEFINED
<@SCRIPT/smaller>/color> SCOPE=/color>"Request"/color>>/color>
function pd1(d) {
if(d.charAt(0)==0) {
nd = d.toString().charAt(1);
return nd;
} else {
nd = d.toString();
return nd;
}
}
</@SCRIPT>/color>
<br>/color>
<@SCRIPT/color> EXPR=/color>"pd1('01')"/color>>
/color>/smaller>/fontfamily>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
