Add Admin Integration?<select name='addAdmin'> <option value="1">yes</option> <option value="0">no</option> </select> User: <br /><input type="text" name="admin_User" id="admin_User" value="" /> Pass: <br /><input type="text" name="admin_Pass" id="admin_Pass" value="" />
if the user selects yes then i want the "user" and "pass" textbox to be visible, otherwise make it invisible. I know no javascript need some help
have you tried jQuery? give it a try, it’s pretty easy to use.
you would basically check for index change on your dropdown.
check for the value. if yes then div.show(). if no then div. hide().
something like this using radio buttons?
<input id="1a" type="radio" name="1" value="Yes" class="static_class style1" /> Yes<br />
<input id="1b" type="radio" name="1" value="No" class="static_class style1" /> No<br />
<div id="extra">
<br /><label>If yes, specify.</label>
<input id="email" type="text" class="style" />
</div>
<script type="text/javascript">
$(".static_class").click(function(){if($(this).val()==="Yes") $("#div").show("fast"); else $("#div").hide("fast");});
</script>