how to pass more than one value with client callback?

A

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)
....
}
 
S

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top