This topic is locked

Checkbox Show/Hide Row on ADD/EDIT page

4/27/2009 5:29:04 AM
PHPRunner General questions
I
inko_nick author

Hello people!
I have a problem with hiding row depending on checkbox on add page. I have the code:
..templates/table_add.htm
<script>

document.forms.editform.other.onchange=function()

{

if (document.forms.editform.other.checked)

document.getElementById("hidediv").style.display="none";

else

document.getElementById("hidediv").style.display="inline";

}

</script>

...............

<TBODY>.......

{BEGIN DATA_fieldblock}

<TR>

<TD class=editshade_b style="PADDING-LEFT: 15px" width=156>DATA</TD>

<TD class=editshade_lb style="PADDING-LEFT: 10px" width=224>{$DATA_editcontrol}

<INPUT type=checkbox name=other>Other</TD> ---<< The Checkbox

</TR>

{END DATA_fieldblock}

{BEGIN HideRow_fieldblock}

<TR id=hidediv>

<TD class=editshade_b style="PADDING-LEFT: 15px" width=150>HideRow</TD>

<TD class=editshade_lb style="PADDING-LEFT: 10px" width=250>{$HideRow_editcontrol} </TD>

</TR>

{END HideRow_fieldblock}
When clicking the checkbox (other) nothing happens.
I check the code... seems that no errors... but still no luck.
Can anyone tell me what's wrong?

Thanks!
PHPRunner 5.0 b766

J
Jane 4/27/2009

Hi,
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.

D
d_gan 7/30/2009

Hello people!

I have a problem with hiding row depending on checkbox on add page. I have the code:
..templates/table_add.htm
<script>

document.forms.editform.other.onchange=function()

{

if (document.forms.editform.other.checked)

document.getElementById("hidediv").style.display="none";

else

document.getElementById("hidediv").style.display="inline";

}

</script>

...............

<TBODY>.......

{BEGIN DATA_fieldblock}

<TR>

<TD class=editshade_b style="PADDING-LEFT: 15px" width=156>DATA</TD>

<TD class=editshade_lb style="PADDING-LEFT: 10px" width=224>{$DATA_editcontrol}

<INPUT type=checkbox name=other>Other</TD> ---<< The Checkbox

</TR>

{END DATA_fieldblock}

{BEGIN HideRow_fieldblock}

<TR id=hidediv>

<TD class=editshade_b style="PADDING-LEFT: 15px" width=150>HideRow</TD>

<TD class=editshade_lb style="PADDING-LEFT: 10px" width=250>{$HideRow_editcontrol} </TD>

</TR>

{END HideRow_fieldblock}
When clicking the checkbox (other) nothing happens.
I check the code... seems that no errors... but still no luck.
Can anyone tell me what's wrong?

Thanks!
PHPRunner 5.0 b766



I tried few others way but at dead end.

What is the solution for this ? Did it manage to workaround? How to hide/show few field in a add/edit form?

J
Jane 7/31/2009