ASP: server and client variables
by Charlotte Gardner <vgardner(at)mindspring.com>
|
Date: |
Sun, 09 Jan 2000 10:13:15 -0500 |
To: |
hwg-languages(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Hello all,
I'm working on a simple ASP script that will pass server-side variables
(created in VBScript) to a client-side (javascript) function.
First I declare and initialize the variables:
Dim nLdrs, aLdrs(4)
nLdrs = 4
aLdrs(0) = "5"
aLdrs(1) = "Doe, John"
aLdrs(2) = "555-123-1234"
aLdrs(3) = "jd(at)yahoo.com"
Then I create a form with a single listbox. When the listbox's selection
changes, I want to pass the variables to the javascript function:
<.SELECT NAME="mySelect" onChange="swapLdrID(<%=nLdrs%>,<%=aLdrs%>);">
When I pass the number variable only, everything is fine -- the number
shows up in
the swapLdrID function. But when I try to pass the array, I get this error:
error 'ASP 0106 : 80020005'
Type Mismatch
?
An unhandled data type was encountered.
Is it possible to pass an array this way? If so, what is the syntax?
Or, is there a better way to approach this?
Thanks,
Charlotte
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA