My Challenge…
When the user enters the page I initialize two arrays,
invArray{num:”none” name:”none” qty:”none”};
nameArray{num:”1″ name:”couch”, num:”2″ name:”sofa”}; (and so on for 100 items)
Then everytime a user completes three text boxes, I grab the info and feed it to the invArray.
txtA is an itemNumber
txtB is an itemName
txtC is an itemQty
after a user leaves txtA for txtB I search nameArray and prefill the txtB with the appropriate name.
At the same time I want to search invArray to see if that item number exists already. If it does, I want to grab it and populate the txtC with the qty. Problem is that I cannot figure out how to get around an item not existing in invArray.
Thoughts?