Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [12:17] <KeenScripter> Hey guys, how's it going?
- [12:17] <KeenScripter> I have a question.
- [12:17] <@robotmayo> sup
- [12:17] <@olivierrr> hi
- [12:18] <KeenScripter> Is it possible to have two html input-radio buttons, and when one or the other is selected, it will display a form (or the other form) on the webpage?
- [12:18] <KeenScripter> !m chippah
- [12:18] <ziggy-js> You're doing great work, chippah!
- [12:19] <@robotmayo> attach a click event to the radio buttons to change the forms when clicked
- [12:19] <KeenScripter> hmm
- [12:19] <KeenScripter> onClick?
- [12:19] <KeenScripter> I see
- [12:20] <KeenScripter> but how would I get the forms created, but not shown on the page, until a radio-button is pressed?
- [12:20] <@robotmayo> the simplest way is to use css classes to hide/show the forms and toggle the classes depending on what button was clicked
- [12:21] == Coldblackice [~Coldblack@unaffiliated/coldblackice] has joined #learnjavascript
- [12:21] <KeenScripter> So I should use html input-radio-buttons, to toggle CSS classes that hide/show html forms, that are linked to my javascript
- [12:22] <KeenScripter> ok, sounds good. Thanks @robotmayo!
- [12:23] <KeenScripter> I can of course do this all using internal CSS?
- [12:23] <KeenScripter> :)
- [12:24] <@robotmayo> probably can do it with pure css now that I think about it
- [12:24] <KeenScripter> ok
- [12:24] <KeenScripter> cool.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement