Home All Groups Group Topic Archive Search About

how to pass more than one value with client callback?

Author
22 Jun 2006 4:35 PM
André
Hi,

I have to pass a lot of variables from vb.net to javascript using client
callback. the problem is that there are single variables, but also arrays
with differents indexes.
I have two questions:
1) is this technology made for passing a lot of variables or in fact only
for one?
2) does it exist a esier way to pass the values and to recover them in
javascript?
Thanks for advice.
André

So far i did this:
Vb.net:
Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
        ret = recbezet & "," & recuur2        ' single variable
        pcbez = Join(pcbezet, ",")                ' array index=10
        uurbez = Join(uur, ",")                       ' array index=10
        logonbez = Join(logon, ",")                ' array index=10
        tpebez = Join(tpe, ",")                        ' array index=10
        htoebez = Join(htoe, ",")                    ' array index=5
        hlokbez = Join(hlok, ",")                   ' array index=5
returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
hlokbez

Javascript
  function ReceiveServerData(rValue)
    {
      recbezet=rValue.substring(0,1)
      recuur2=rValue.substring(2,3)
....
}

Author
22 Jun 2006 11:14 PM
Steve C. Orr [MVP, MCSD]
You can only pass back one value, so concatenating them together and then
splitting them apart again on the other end is the standard solution.  It
looks like you're pretty much doing that already so I don't have any
complaints.
Here's an example I put together:
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


Show quoteHide quote
"André" <y**@dfd.az> wrote in message
news:uK8NynhlGHA.3304@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> I have to pass a lot of variables from vb.net to javascript using client
> callback. the problem is that there are single variables, but also arrays
> with differents indexes.
> I have two questions:
> 1) is this technology made for passing a lot of variables or in fact only
> for one?
> 2) does it exist a esier way to pass the values and to recover them in
> javascript?
> Thanks for advice.
> André
>
> So far i did this:
> Vb.net:
> Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
>        ret = recbezet & "," & recuur2        ' single variable
>        pcbez = Join(pcbezet, ",")                ' array index=10
>        uurbez = Join(uur, ",")                       ' array index=10
>        logonbez = Join(logon, ",")                ' array index=10
>        tpebez = Join(tpe, ",")                        ' array index=10
>        htoebez = Join(htoe, ",")                    ' array index=5
>        hlokbez = Join(hlok, ",")                   ' array index=5
> returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
> hlokbez
>
> Javascript
>  function ReceiveServerData(rValue)
>    {
>      recbezet=rValue.substring(0,1)
>      recuur2=rValue.substring(2,3)
> ...
> }
>
>
Author
23 Jun 2006 6:37 AM
André
Thanks

Show quoteHide quote
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eSKgaGllGHA.408@TK2MSFTNGP03.phx.gbl...
> You can only pass back one value, so concatenating them together and then
> splitting them apart again on the other end is the standard solution.  It
> looks like you're pretty much doing that already so I don't have any
> complaints.
> Here's an example I put together:
> http://SteveOrr.net/articles/WebChat.aspx
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "André" <y**@dfd.az> wrote in message
> news:uK8NynhlGHA.3304@TK2MSFTNGP03.phx.gbl...
> > Hi,
> >
> > I have to pass a lot of variables from vb.net to javascript using client
> > callback. the problem is that there are single variables, but also
arrays
> > with differents indexes.
> > I have two questions:
> > 1) is this technology made for passing a lot of variables or in fact
only
> > for one?
> > 2) does it exist a esier way to pass the values and to recover them in
> > javascript?
> > Thanks for advice.
> > André
> >
> > So far i did this:
> > Vb.net:
> > Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez
> >        ret = recbezet & "," & recuur2        ' single variable
> >        pcbez = Join(pcbezet, ",")                ' array index=10
> >        uurbez = Join(uur, ",")                       ' array index=10
> >        logonbez = Join(logon, ",")                ' array index=10
> >        tpebez = Join(tpe, ",")                        ' array index=10
> >        htoebez = Join(htoe, ",")                    ' array index=5
> >        hlokbez = Join(hlok, ",")                   ' array index=5
> > returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez &
> > hlokbez
> >
> > Javascript
> >  function ReceiveServerData(rValue)
> >    {
> >      recbezet=rValue.substring(0,1)
> >      recuur2=rValue.substring(2,3)
> > ...
> > }
> >
> >
>
>