/    Sign up×
Community /Pin to ProfileBookmark

Some form help

I’ve got a form with 3 radio buttons (Cash, Check, Credit). When cash is selected I need to activate a text area to input a dollar amount and display appropriate instuctions. When check or credit is displayed I need only to display the instructions.

I am a beginner when it comes to js and hope someone could whip me up a script. I would greatly appreciate any help.

Thanks,
MADK

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Santhi_ThavasiNov 23.2004 — Hi there,

You could probably have two <div></div> tags.

Within one div tag, have the textbox, and inside the another, have the instructions.

When u click on ur 'Cash' radio button, set the visibility of both the div tags to 'display:block'.

For the other two radio buttons, set the visibility of ur text box div area to 'display:none', and the instructions div area to visible.

Hope u could get a solution out of this.

Regards,

-Santhi.
Copy linkTweet thisAlerts:
@madkauthorNov 23.2004 — Figured it out! Thanks.
Copy linkTweet thisAlerts:
@TheIrishThugFeb 12.2006 — ok, i need to use this to activate a form. but how exactly do i adjust the atributes of the text input using javascript.
×

Success!

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