JimD
Feb 27th 2009, 7:51 am
I have checkbox "Other" that if the user checkes it a text field will open. I get that to work, but if the user unchecks it the text box doesn't go away.
Can someone tell me what I'm missing? Here's the code. By the way I'm a newbie with javascript so the code might seem messy to you pros
<input name="checkbox_other" type="checkbox" class="text_background" id="checkbox_other" value="other"onclick="(this.value=='other') ? document.getElementById('newClientLbl').style.display='' : document.getElementById('newClientLbl').style.display='none'"><label style="display:none" id="newClientLbl">Enter Your Client Type: <input type="text" name="newClient" class="text_background"></label>
Any help will be appreciated
Can someone tell me what I'm missing? Here's the code. By the way I'm a newbie with javascript so the code might seem messy to you pros
<input name="checkbox_other" type="checkbox" class="text_background" id="checkbox_other" value="other"onclick="(this.value=='other') ? document.getElementById('newClientLbl').style.display='' : document.getElementById('newClientLbl').style.display='none'"><label style="display:none" id="newClientLbl">Enter Your Client Type: <input type="text" name="newClient" class="text_background"></label>
Any help will be appreciated