Groups | Blog | Home
all groups > coldfusion flash integration > february 2006 >

coldfusion flash integration : CFFORMITEM visible...does it work?


hanzelmans
2/6/2006 4:51:00 PM
I am trying to toggle a <cfformitem tag to be visible or not visible depending
on various circumstances.

If I change it to "visible=no" in the tag itself, it works perfectly fine.
However, I cannot dynamically change the visible option.

Is there something wrong the the script in my <cfsavecontent> tag? From what
I have seen in other examples, it should work.

Thanks for any help,
Steve

<cfsavecontent variable="onchange">
if (Homework.selectedItem.data=="") {
attachLink.visible=false;
}
else
{
attachLink.visible=true;
}
</cfsavecontent>
<table id="container"><tr><td>
<cfform name="Homework" timeout="60" format="flash" onChange="#onchange#"
style="themeColor:##56A1E1; marginRight:0; background-color:##37749D;">
<cfformitem type="html" id="attachLink" bind="{'<p><a
href=\'uploads/'+listingGrid.selectedItem.ATTACH_PATH+'\'>listingGrid.selectedIt
em.ATTACH_DESC</a></p>'}"
visible="no">
</cfformitem>
hanzelmans
2/6/2006 6:25:08 PM
Whoops!

I found the problem.

I used the form name in the if statement rather than the cfgrid name. Should be listingGrid.selectedItem.data!

AddThis Social Bookmark Button