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>
Whoops! I found the problem. I used the form name in the if statement rather than the cfgrid name. Should be listingGrid.selectedItem.data!
Don't see what you're looking for? Try a search.
|