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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing asp arrays to a javascript function

Status
Not open for further replies.

ducky62

Programmer
Jul 10, 2001
24
CA


I have 3 arrays :

Set objRecordSet2 =
Server.CreateObject("ADODB.RecordSet")
objRecordSet2.ActiveConnection = objConnection
objRecordSet2.Open "SELECT * FROM tbl_names"
dim register,register2,register3,v
redim register(2000)
redim register2(2000)
redim register3(2000)
v=0
while not objRecordSet2.eof
register(v)=objRecordSet2("name")
register2(v)=objRecordSet2("email")
register3(v)=objRecordSet2("phone")
v=v+1
objrecordset2.movenext
wend

now I have a web form and when the user enters a name I want the
page to search through the register array and see if the name is in
there. If it is I want to other fields to be filled with the corresponding
values in register2 and register 3

what onchange call would I put in the line:

<INPUT TYPE=text NAME=&quot;name&quot; onchange=&quot;????????&quot; >
and what would the function be???

my form name is dataEntryform

thanks for your help

Derek McCart
 
Here's a section of Javascript ASP that does what you're asking about when it preloads image files. This was taken from a working site that's online, and it works perfectly.

<% for (bi=0;bi<bmax;bi++)
{
Response.Write('image[' + bi + ']=new Image();');
Response.Write('image[' + bi + '].src=&quot;');
Response.Write(SubD + 'images/buttons/b' + ((pagename==linkpage) ? '1-' : '0-') + linkpage + '1.gif&quot;;');
}
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top