Web Hosting Talk







View Full Version : Web form - Form Elements


supportskins
12-20-2007, 12:49 PM
Hi,
We are designing a web form and are looking for appropriate javascripts which would allow us to archive the following:

We have a drop down menu having options Comment and No Comment. "No Comment" is selected by default. If the form submitter changes it to "Comment" a text box will automatically appear in the form. On toggling it back to No Comment the text box should be removed. What is the best way to get this done?

Thank You for your replies.

Jay August
12-20-2007, 01:23 PM
Dutin Diaz has an article on his website that covers seven ways to toggle contents.
http://www.dustindiaz.com/seven-togglers/

Otherwise Dynamic Drive's Form Dependency Manager might help you out:
http://dynamicdrive.com/dynamicindex16/formdependency.htm

Web Master World has a forum thread about the same:
http://www.webmasterworld.com/forum91/2956.htm

And if none helps, I found this with the Google keywords 'javascript toggle radio'

supportskins
12-20-2007, 02:24 PM
Perfect, exactly what I was looking for! Thanks a ton.

Jay August
12-20-2007, 07:15 PM
you're welcome! :) Good luck!