This topic is locked

Choosing fields to display depending on variable

7/17/2007 4:59:45 AM
ASPRunnerPro General questions
R
robarelli author

Hi,
I have a three-layer master-detail relationship hierarchy, with table Projects with one or more related records in table WasteMgmtPlans, in turn with one or more related records in table WasteTypeMgmtPlan.
On the List page for WasteTypeMgmtPlan I would like to add a OnLoad/BeforeDisplay event that checks the value of a variable from table Projects called ProjectValue, and based on its value determines which columns/fields should be displayed.
I've added ProjectValue to the Master table info for WasteMgmtPlans by using a SQL join query and the master detail information is displayed on the WasteTypeMgmtPlan List page.
Is there a way of doing this inside ASPRunner? Can I somehow control which fields are displayed in an OnLoad/BeforeDisplay event?

R
robarelli author 7/18/2007

I decided to do it with JavaScript after generating files. This leads to my other question: Why can I not include JavaScript in the head of template file when I'm in Visual Editor mode. ASPRunner keeps moving my javascript code to the bpdy of the document.