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..
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sonam sherpa
Thank You. That really did the job for me but now how do I
get the POST value of both the radio button and the select
box. Or at least I want the value of the selection box that
was activated after clicking the radio button?
would really appreciate your help.
Is This Answer Correct ? | 74 Yes | 43 No |
Answer / amitabh
take off your pants. press your buttocks. you will get the answer.
Is This Answer Correct ? | 35 Yes | 15 No |
Answer / smita
Hi Monika,
Thats really very helpful.
In addition to this I have on more query,
With textbox I have one submit button, when I click on that
submit button(submits form) the textbox disappears and comes
back to radio button .
Would really appreciate you help.
Thanks
Is This Answer Correct ? | 5 Yes | 7 No |
hi sir am kiran kumar finished my mca 2009 passed out sir .. i have more doubts regarding open source technologies sir if we pass zend exam in php can we get a job opportunity in foreign countries sir and is it good demand for php compared to dot net and java and some other technologies like sap , erp sir bcoz my friends saying they are finished dot net and java courses they telling in php we cannot earn more and we cannot go onsite opportunity even big companies not dealing with php is it right ah sir ? please send ur valuable suggestions to my email sir kiranpulsar2007@gmail.com please send ur phone number also sir thanking u sir
Tell me what types of loops exist in php?
1. Create student database. 2. First page should display the students available in the database. There should be add, edit and delete buttons. 3. There should be option to search students by name, code, date of joining, department or combination of these. 4. Should have an add/edit screen. Add and Edit should be handled in the same page. 5. Delete should ask for confirmation before deleting the actual record. 6. Validation should be done in JavaScript as well as php.
what method is used to get a user's IP address?
How to know user has read the email-php?
How can i send a HTML file to mail account.
find highest salary
Explain me what is the use of header() function in php?
How can you create a session in php?
When do sessions end?
What is boolean in php?
Tell me what is the main difference between require() and require_once()?