/    Sign up×
Community /Pin to ProfileBookmark

Hi all,
I created a perl form to collect data in a flat text file and it work great.
1. Date
2. Part Number
3. Description
4. Quantity
5. Comment

But if I have a part number and a list
501-1234-01 Desk
501-2345-02 Chair
501-4567-01 Book
501-9876-02 Pen

will javascript can write to add in this html form, so if people add part number 501-1234-XX it will auto fill in Description is Desk, or 501-2345-XX and it will auto fill in Chair, so we only add Quantity and Comment ? it will advoid of mistyping or force poeple to type or select on description.

I saw the script if you add the zip code then it auto fill in the state, it is cool so i think someone can do this and will you show me the code.

Thanks for your help

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliNov 06.2003 — yes its pretty simple to get this done really,

just asign an onkeyup event call to the textfield in question and use a function that will check whats the value in the field...depending upon the value just show the description somewhere on the page
Copy linkTweet thisAlerts:
@thuyduongauthorNov 06.2003 — Hi Ai,

How do you that ? Could you show me the code ?

Thanks for your help.?
×

Success!

Help @thuyduong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...