When using new Adobe ColdFusion MX 7 Flash-based form controls, such as Tab Navigator, Accordian and Repeator types, you will need to use the ID attribute to reference the control within Actionscript. The name attribute does not allow you to reference the control in Actionscript.
When the dynamic Adobe Flash SWF file is generated from thecfform tags, it will name the controls based upon the ID attribute. The Actionscript you place in your CFML code is also embedded in the SWF. When you click a tab or button on the Adobe Flash form and have the Actionscript execute, it requires the name of the control, which is the ID attribute.
The code below demonstrates how to use the ID attribute for navigating from one tab to another via a button control.
<cfform name="form1" skin="HaloBlue"><cfformgroup type="TabNavigator" name="tnav" id="tnav"><cfformgroup type="Page" label="tab1"><cfformgroup type="Horizontal" ><cfinput label="Company ID:" type="text" name="ID" ><cfinput value="Go To 1" onClick="tnav.selectedIndex=1;" type="button" name="b1" ></cfformgroup></cfformgroup><cfformgroup type="Page" label="tab2"><cfformgroup type="Horizontal" ><cfinput label="Company ID:" type="text" name="ID2" ><cfinput value="Go To 2" onClick="tnav.selectedIndex=2;" type="button" name="b2" ></cfformgroup></cfformgroup><cfformgroup type="Page" label="tab3"><cfformgroup type="Horizontal" ><cfinput label="Company ID:" type="text" name="ID3" ><cfinput value="Go To 0" onClick="tnav.selectedIndex=0;" type="button" name="b3" ></cfformgroup></cfformgroup></cfformgroup></cfform>
If you were to remove the ID attribute, the SWF will not compile due to the Actionscript error, and you would see the following error in the server's console window or out log:
user CFSwfServlet: Error: There is no property with the name 'tnav'.

