I have two radio button, i click one radio button display
one dropdown box, one text field. and then click another
radio button display one text field.so any one give me good
idea plz.....i used <div id="" style=display:none> but not
work..
Answer Posted / monika
Please try following:
<html>
<head>
<script language='javascript'>
function display(){
if(document.frmRadio.selType[0].checked){
document.getElementById('div1').style.display
= 'block';
document.getElementById('div2').style.display
= 'block' ;
}
else{
document.getElementById('div2').style.display
= 'none';
document.getElementById('div1').style.display
= 'block';
}
}
</script>
</head>
<body>
<form name='frmRadio'>
<tr><td><input type=radio name='selType' onclick='display
()'> Display dropdown & textbox</td></tr>
<tr><td><input type=radio name='selType' onclick='display
()'> Display Textbox Only</td></tr>
<tr height='30'><td> </td></tr>
<div id='div1' style=display:none>
<tr>
<td><input type='text' name='txtName'></td>
</tr>
</div>
<div id='div2' style=display:none>
<tr>
<td>
<select name='selOption'>
<option value='A'>A</option>
<option value='B'>B</option>
</select>
</td>
</tr>
</div>
</form>
</body>
</html>
| Is This Answer Correct ? | 209 Yes | 34 No |
Post New Answer View All Answers
What is the alternative structure for control structures?
What is asort php?
How many types of functions are there in php?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What is composer install?
What percentage of websites use php?
Where can I learn php?
Will php die?
What is global array in php?
How check variable is set or not in php?
How many records can be stored in mysql table?
How arrays are used in php?
What are the disadvantages of php?
What is meant by an associative array?
What are the array functions in php?