Forum Moderators: open
Is it possible to know whether a particular readiobutton (for instance) has been checked BEFORE the submit button is clicked?
Ideally, I would like to make a textarea appear ONLY if a particular radiobutton has been checked.
Choose
O current week
O current month
O to date
O since ¦___________¦ <---- textarea should appear only if 'since' radiobutton has been checked
Thank you!
<script language=javascript>
function s(ob)
{
if(ob.checked==1){document.getElementById('issince').style.visibility='visible'}else{document.getElementById('issince').style.visibility='hidden'}
}
</script><input type=radio name=collection> current week <br>
<input type=radio name=collection checked> current month<br>
<input type=radio name=collection> to date<br>
<input type=radio name=collection onFocus="s(this)" onBlur="s(this)" onClick="s(this)" onChange="s(this)"> since <input type="text" id=issince style="visibility:hidden"><br>
Some minor flaws, but they can be fixed.