Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I have two radio button, i click one radio button display one dropdown box, one text field. and th..

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>&nbsp;</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

I have two radio button, i click one radio button display one dropdown box, one text field. and th..

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

I have two radio button, i click one radio button display one dropdown box, one text field. and th..

Answer / amitabh

take off your pants. press your buttocks. you will get the answer.

Is This Answer Correct ?    35 Yes 15 No

I have two radio button, i click one radio button display one dropdown box, one text field. and th..

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

Post New Answer

More PHP Interview Questions

How does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

0 Answers  


Can you specify the "new line" character in single-quoted strings?

0 Answers  


How many bootable file in O/S - XP,2000, and 98. which are the files.

1 Answers   IBM,


Write a select query that will be displayed the duplicated site name and how many times it is duplicated?

0 Answers  


What are the 3 scope levels available in php and how would you define them?

0 Answers  


How do you identify independent and dependent variables in regression analysis?

0 Answers  


What are the Advantages and Application Areas of PHP?

0 Answers  


What is the apache?

0 Answers  


What are Routines?

0 Answers  


What is helper function?

0 Answers  


How do you pass a variable by value?

0 Answers  


Explain the importance of the function htmlentities.

0 Answers  


Categories