/    Sign up×
Community /Pin to ProfileBookmark

radio button to dropdown..urget plz

hi all

see this code i want to convert the radio button to a dropdown list

[CODE]

<html >

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
<title>Check this box for TEXT INPUT</title>

<script language=”javascript”>

function showtext(){
document.getElementById(‘text’).style.display=’inline’;
document.getElementById(‘menu’).style.display=’none’;
}
function showmenu(){
document.getElementById(‘menu’).style.display=’inline’;
document.getElementById(‘text’).style.display=’none’;
}
</script>

</head>

<body>

<table>
<tr>
<td>Male</td>
<td><input type=”radio” onclick=”showtext()”></td>
<td rowspan=”2″>
<div id=”text” style=”display: inline”>
<select name=”dropdown” style=”font-size:10px;” size=”1″>
<option>John</option>
<option>David</option>
<option>Mike</option>
</select>

</div>
<div id=”menu” style=”display: none”>
<select name=”dropdown” style=”font-size:10px;” size=”1″>
<option>Roza</option>
<option>Jane</option>
<option>Christina</option>
</select>
</div>
</td>
</tr>
<td>Female</td>
<td><input type=”radio” onclick=”showmenu()”></td>
</tr>
</table>

</body>

</html>

[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERMar 09.2008 — [code=php]
<input type="radio" onClick="showmenu()" value="Male">Male
<input type="radio" onClick="showmenu()" value="Female">Female
<input type="radio" onClick="showmenu()" value="Neutered">Neutered
<input type="radio" onClick="showmenu()" value="Spayed">Spayed
[/code]
×

Success!

Help @jack001 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...