The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Show textbox on radio button check
DeadSayWhat
post Mar 7 2023, 01:13 AM
Post #1


Newbie
*

Group: Members
Posts: 13
Joined: 23-January 23
Member No.: 28,764



Hi, for an assignment I have a username and password input textbox appear when a radio button is checked and can't figure out how.
Any help would be greatly appreciated.

Currently I have

html
<div class="usernamebox"><label for="username">Username: </label><input type="text" id="username" name="username" placeholder="username"></div>
<div class="passwordbox"><label for="password">Password: </label><input type="password" id="password" name="password" placeholder="password"></div>

java

<script>function display() {if(document.getElementById("signup").checked) {
document.getElementById("username").style.display = "inline";
document.getElementById("password").style.display = "inline";}}</script>

css
.usernamebox{display: none;}
.passwordbox{display: none;}
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Mar 7 2023, 02:48 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Where's the HTML for the radio button?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 12th May 2024 - 09:43 AM