[DOM] print hidden field onclick checkbox!
ok I know it sound stronge but let me explaine
I have a script that disable fields based on a checkbox been cheked or not
it also hide a select field if it is checked . what I need is to echo a hidden field in my form
let me show you
Code:
1 2 3 4 5 6 7 8 9 10 11
| <script>
function updateBox(){
if(document.forms[0].SUPPORT.checked){
document.forms[0].ids.style.visibility = "hidden";
document.write("<input type='hidden' name='ids' value='2'>");
}else{
document.forms[0].ids.style.visibility = "visible";
}
}
</script> |
but this does not work
could you please help me or guide me to a place I can find an answer
thank you