[ic] How to assign a scratch variable to a VBScript Variable??

interchange at tvcables.co.uk interchange at tvcables.co.uk
Thu Dec 2 18:53:18 EST 2004


Quoting interchange at tvcables.co.uk:

> Quoting Tom Luong <tluon002 at lions.odu.edu>:
> 
> > From: <interchange at tvcables.co.uk>
> > 
> > Subject: [ic] How to assign a scratch variable to a VBScript Variable??
> > 
> > 
> > > Hi folks,
> > >
> > > I need to assign a sratch varible to a vbscript variable but cannot make
> > it
> > > work, I have tried this:-
> > >
> > > <script language="vbscript">
> > > dim vbname
> > > vbname=[scratch newname]
> > >
> > 
> > Try
> > vbname="[seti newname]value of newname[/seti]"
> > 
> > and you retrieve the value of the variable by
> > [scratch newname]
> > 
> > or, anyways you have to set the value somewhere before you can call it up.
> > 
> > Hope that helps,
> > Tom
> 
> Thanks for the reply Tom, here is some code to show what I am  trying to
> do:-
> 
> I set a scratch variable on my admin_view page, this works just fine and I
> can 
> display the varible on the screen ok, so I know its been set.
> 
> [set myname]
> [loop-calc]
>         my $myname = q{[loop-data transactions fname] [loop-data transactions
> 
> lname]};
>         $myname =~ s/(\S+)/\L\u$1/g;    # first to upper
>         $myname;
> [/loop-calc]
> [/set]
> 
> [scratch myname] - Display on screen ok!
> 
> Now I have my scratch variable (myname) I am trying to use its value (text 
> string) in some vbscript.
> 
> I am trying to set my vb variable (vbname) to be equal to the value of the 
> scratch variable (myname), I thought this would work:
> 
> <script language="vbscript">
> dim vbname
> vbname = "[scratch myname]"

The bottom got chopped, I have also tried:-

vbname = "[value myname]"

and 

vbname = "[value scratch myname]"

But none work....

Andy.


More information about the interchange-users mailing list