Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Looking for a script to..

    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?

  • #2
    New Coder
    Join Date
    Apr 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    New Coder
    Join Date
    Apr 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Is there a way to make this code work with more than 1 dropdown ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •