Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

JavaScript Radio Buttons

I am trying to figure out how to change the layout of a webpage by clicking a radio button!

With two buttons: Convert Fahrenheit to Celsius Convert Celcius to Fahrenheit

And when you click on one of them, it changes the equation in the text box.

Example:

The equation already asks to enter in Fahrenheit, but when you click the celsius to Fahrenheit button, the page changes and the equation asks you to enter in celsius!

1 Answer

Steven Parker
Steven Parker
243,318 Points

You've described your functionality, but what's your question?

I think I understand what you are creating, but what part of it are you having trouble with? Please share the code you have so far (property formatted) and/or a link to your workspace snapshot or github repo or external REPL.

Have you already taken the courses that teach the kinds of skills you might use for this, like DOM Scripting By Example, or JavaScript and the DOM?