Try out
<server>
for i=1:1:16 S @("z"_i)=$Get(^myGlobal("A",tc,sex,date,i))
</server>
In this case, all variables (z1 .. z16) are created and filled with data (if
the global exists), otherwise left blank.
Ralf
"SK" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi,
>
>
> I have the following in code my CSP page.
>
> <script language="CACHE" runat="server">
>
> for i=1:1:10
> {
> if $Data(^myGlobal("A",tc,sex,date,i))
> {
> // I need to be able to dynamically create a variables z1 -
z16
> as shown below and then set my textfields to their values - but what I am
> doing is illegal.
> set z_i=> }
> }
>
> </script>
>
> I have worked out that I can do the following - which means that my first
> problem has been solved. My problem as mentioned above is now
> in creating these variables dynamically.
>
>
> <input name="z1" value=#(z1)# type="text" size="15" id="1">
> <input name="z1" value=#(z2)# type="text" size="15" id="1">
>
> Does anyone know how I can achieve this?
>
> Thanks,
>
> Sk
>
>
>
> "Denver Braughler" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > SK wrote:
> > > how I can set the value of a textbox from within COS?
> >
> > First of all, what is a "textbox"?
> >
> > An <input type="text"> or a <textarea>?
> >
> > w "<textarea>"
> > w @globalref
> > w "</textarea>"
> >
> >
> > Or do you mean from CSP?
> >
> > <textarea class="softwrap" wrap="soft" name="myfield"
> > rows="4" cols="80" CSPBIND="myfield"
> > onchange="form_hasChanged()"></textarea>
> >
> >
> > Or do you mean from JavaScript using a #server(..formLoad(id))# call?
> >
> > It would help us greatly if you would state exactly what you have and
> exactly what you wish to accomplish.
>
>