Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Array

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
I have an ASP array, I need to pass it to a browser event handler. How Do I pass the array to a VBScript function, and in the VBScript fucniton, how to i loop thru it?

Here is what I have:
ASP Code:
(inside a <select>)
onChange='DisplayPullDown(&quot; & iArray & &quot;)'>&quot;

VBScript code:
Sub DisplayPullDown(X)
document.write X(0)
document.write X(1)
document.write X(2)
End Sub



any help would be great.
MH
 
Couple of things:
1. Client-side VBScript is a no-no - only supported by IE.
2. How about something like

ASP Code:
(inside a <select>)
onChange='DisplayPullDown(<%iArray%>)'>&quot;

Javascript code:
function DisplayPullDown(X){
for (var i=0; i < X.length; i++) document.write X[0];
}

(not tested) codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top