/    Sign up×
Community /Pin to ProfileBookmark

Select List outputs data to field

Hello World:

I have a select list that I works fine, my question is, is there a way for html to output data into a field on the screen based on the select list? Example: I have a select list of 1 2 3 4. If the user chooses number 3 from the list, i want the word “three” to fill into another field on the screen.

I hope i make sense. I have seen these on some forms, but can’t recall any rightnow.

Any help is appreciated.

Thanks

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 09.2004 — <form action="#" name="my">
<select name="fruit" onchange="document.my.suprise.value=document.my.fruit.options[document.my.fruit.selectedIndex].value;">
<option value="">Make a choise</option>
<option value="apple">A</option>
<option value="banana">B</option>
<option value="cranberry">C</option>
</select>
<input type="text" name="suprise" />
</form>
×

Success!

Help @dez247 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...