/    Sign up×
Community /Pin to ProfileBookmark

Hi,

I am trying to change the value of the 2 text fileds onChange of Menu.
1st txtbox would change to the value of the Menu
document.form1.Padd.value = document.form1.Pname.value;
My problem is txtbox 2 which value I want to change to the Menu label.
HELP!

Thanks ?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJun 19.2006 — Are you talking about an actual LABEL tag?
Copy linkTweet thisAlerts:
@TiGGiauthorJun 19.2006 — <option value="1">One</option>

I want 2nd txt filed to be "One"
Copy linkTweet thisAlerts:
@phpnoviceJun 19.2006 — Oh.

var sel = document.form1.Pname;

document.form1.Padd.value = sel.options[sel.selectedIndex].value;

document.form1.txtbox2.value = sel.options[sel.selectedIndex].text;
×

Success!

Help @TiGGi 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,
)...