This topic is locked

Javascript to uncheck checkbox

2/11/2010 2:49:20 AM
PHPRunner General questions
J
joeedel author

PHPRunner 5.0
Hello,

Trying a bit of Javascript so that when one box is checked another becomes unchecked. When I use firebug (in firefox) and add the onclick event in checkbox element all works as expected; however I am under the impression that this method is not possible using PHPRunner. So my question becomes what is the correct code to accomplish this task the two checkboxes in question are named next_phase & previous_phase, here is the code I am trying (I have tried without the literal tags as well.



{literal}

<script language="Javascript" type="text/javascript">

document.forms.editform.value_next_phase.onClick="document.forms.editform.value_previous_phase.checked=false"

document.forms.editform.value_previous_phase.onClick="document.forms.editform.value_next_phase.checked=false"

</script>

{/literal}


I have also tried



<script>

document.forms.editform.value_next_phase.onClick=function()

{

document.forms.editform.value_previous_phase.checked=false;

}

</script>


Stumped, Thanks in advance.

Joe

J
Jane 2/15/2010

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.