Skip to main content
August 9, 2010
Question

Hide/Show cfgrid

  • August 9, 2010
  • 1 reply
  • 544 views

Is there any way to show a hidden cfgrid based
on an OnChange event from another cfgrid? I've tried using

a javascript function call.

<!--- First grid excerpt  --->...

bind="cfc:ATC._cfc.GetRCPsForFTEs.GetFTEs({cfgridpage},
       {cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{RCPs4FTEs.RCP_ID})"
      onChange="javascript:toggleEdit(EditTog)">

<!--- 2nd grid excerpt  --->

<!--- hide/show grid  --->
<script language="JavaScript">
function ChangeGrid(obj) {
   if (document.getElementById(obj).style.display == ")
   {document.getElementById(obj).style.display = 'none';}
   else
   {document.getElementById(obj).style.display = ";}
  
   alert("function ran");
}
</script>

If not,
any suggestions on how I could show the hidden
cfgrid from another cfgrid by some other method?

Thanks

This topic has been closed for replies.

1 reply

August 9, 2010

Sorry. My previous post was incomplete.

This should be the full message:

Is There any way to show a hidden cfgrid based on an OnChange event from another cfgrid?

I tried using a javascript function:

<!--- show/hide cfgrid  --->
<script language="JavaScript">
function ToggleEdit(obj) {
   if (document.getElementById(obj).style.display == ")
   {document.getElementById(obj).style.display = 'none';}
   else
   {document.getElementById(obj).style.display = ";}
}
</script>

<!--- 1st grid excerpt  --->

...

bind="cfc:ATC._cfc.GetRCPsForFTEs.GetFTEs({cfgridpage},
       {cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{RCPs4FTEs.RCP_ID})"
      onChange="javascript:toggleEdit(EditTog)">

...

<!--- 2nd grid excerpt  --->

<div id="EditTog" style="display:none">

   <cfform  name="FTE_EDIT">
   <!--- 7/12/10 Update an FTE chosen from the 2nd grid.  --->
<!---                 values="#ValueList(qChosenFTE.Cat_Name)#"
              valuesdisplay="#ValueList(qChosenFTE.Cat_Name)#" --->
       <cfgrid name= "FTE_EDIT"

...

Any suggestions on what might work?

Thanks.