Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with this code.

Status
Not open for further replies.

frankcpl

Technical User
Mar 16, 2007
77
US
I am trying to figure out how I can hide the the select model unless the "yes" radio button is selected. I am at a loss. Any help is much appreciated.


<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Do you own a car?</label>
<div class="float_left">
<input value="No" title="" class="radio" id="radio80" name="radio8" type="radio" />
<label for="radio80" class="radio_label">No</label>
<br />

<input value="Yes" title="" class="radio" id="radio81" name="radio8" type="radio" />
<label for="radio81" class="radio_label">Yes</label>
<br />


</div>

</div>
<div class="cfclear"> </div>
</div>

<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">What model is it?</label>
<select class="cf_inputbox" id="select_43" size="1" title="" name="select_43">
<option value="">Choose Option</option>
<option value="Chevy">Chevy</option>
<option value="Ford">Ford</option>
 
Not with PHP, or Cold Fusion (which seems to be what you are using judging by the names of your elements) for that matter.

Try forum216 instead.

I do recommend you change the Radio Button to a checkbox so it can be unchecked if needed. Radio buttons cannot be deselected.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thank you for the input and fast reply. So PHP can not accomplish this? Hmm very good to know.
 
Nope. PHP runs on the server, it has no control over what the elements do once they are delivered to the browser. Javascript can alter elements and do other things directly on the client machine (browser).

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top