Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
HTML Pages with CSS and JavaScript
Radio buttons
Angela D'souza
Ranch Hand
Posts: 469
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have two radio button & one textbox:
Radio A
Radio B
Textbox T
When I select radio button A, I want to disable textbox and when I select radio button B, I want to enabled textbox. How can I do it?
Thanks,
Angela
Charlie Sturman
Ranch Hand
Posts: 112
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The "on click" event needs the space removed this is a forum software problem
<form name="control"> <input type=radio name="r" checked value=1 on click="this.form.text.readOnly=true;this.form.text.value=''">A disable text box <br> <input type=radio name="r" value=2 on click="this.form.text.readOnly=false">B enable text box <input type=text readonly name="text"> </form>
[ May 09, 2002: Message edited by: Charlie Sturman ]
It will give me the powers of the gods. Not bad for a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to populate a value in text box
how to display a textbox when a radio button is selected
java script problem
ava script for diable/enable textbox and options with the help of radio button
Selecting a second radio button on checking the first
More...