This topic is locked
[SOLVED]

 Dependent checkbox

7/9/2010 6:57:40 AM
PHPRunner General questions
D
dzubovic author

I have instruction that is possible to made depedent checkbox using javascript.
I do not know how to do that.
Can anybody have time to do that for me.
And explain to me how to implement that to Phprunner (on what event etc.)
Thanks in advance.

A
ann 7/9/2010

Damir,
here is a sample code to check on the second checkbox if first one is checked.

Proceed to the Visual Editor tab, switch to the HTML mode and add at the of the page:

<script>

document.forms.editform1.value_Field1_1.onchange= function()

{

if (document.forms.editform1.value_Field1_1.checked==true){

document.forms.editform1.value_Field2_1.checked = true}

else {

document.forms.editform1.value_Field2_1.checked = false}

}

</script>



where Field1, Field2 are your actual field names.