...

View Full Version : Looking for a script to..



tcadieux
05-01-2007, 02:42 PM
I want to load an array when the page loads, then if a user starts to type a number into a textbox, the system would autofill with information from the array until the user picks the correct info, then the corresponding info would appear in a second textbox?

venkatmallu.net
05-01-2007, 04:14 PM
I want to load an array when the page loads, then if a user starts to type a number into a textbox, the system would autofill with information from the array until the user picks the correct info, then the corresponding info would appear in a second textbox?

1) inorder to load an array when the page loads...
call a javascript function for body onload event like this
<body onload=loadArr()>

2) in the loadArr() initialize the array with data as code in below link
its better to use an xml file. and the tag values are assigned to the array

3)in order to compare the values call another function for textbox "onkeypress" event as comp().

4) in the comp() compare the characters entered in the textbox with the array elements.... and which matches this string show in 2nd textbox

venkatmallu.net
05-01-2007, 04:16 PM
this is the link
http://codingforums.com/showthread.php?t=113049

tcadieux
05-01-2007, 07:40 PM
Is there a way to make this code work with more than 1 dropdown ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum