Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting text box to drop down on radio button event

 
Raghu Kalyan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i Have 2 radio buttons say RD1 and RD2and one text box.
By default RD1 button is selected and text box is also default. But now when i click the RD2 radio button the text box should be replaced with drop down without the page refresh. Is it possible using javacsript?
If there is any solution please let me know.
 
Anilkumar Ravinuthala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the onclick you can write your own function, and have a flag.Let it be altered by your radiobutton click. Based on that flag you can show textbox or Dropdown.
is this idea helpful to you. let me know.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Kalyan A R",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Initials for a last name are not accepatable.

Thanks!
bear
JavaRanch Sheriff
[ January 19, 2007: Message edited by: Bear Bibeault ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic