all groups > coldfusion flash integration > june 2006 >
You're in the

coldfusion flash integration

group:

CFFORM and tabs


CFFORM and tabs danwparker
6/23/2006 1:07:12 PM
coldfusion flash integration: I have a flash form with multiple tabs. When the user clicks the Submit button,
I want the form to reload with the same tab on top.

Example: There are two tabs: "Car" and "House". "Car" is the top tab. If the
user hits submit while on the "House" tab, I want the page to reload with the
"House" tab selected. Thank you!!
Re: CFFORM and tabs danwparker
6/23/2006 3:36:08 PM
This might not be the best solution, but it works:

<!--- set default tab to 0 --->
<cfparam name="thisTab" default="0">

<!--- selectedindex tells the form which tab to focus on --->
<cfformgroup type="TabNavigator" selectedindex="#thisTab#" id="tabs">

<!--- create a hidden form field and populate it with the currently selected
tab's index --->
<cfinput type="hidden" name="thisTab" value="">
<cfinput type="submit" name="Submit" value="Submit" onClick="theForm.thisTab =
tabs.selectedIndex;">
AddThis Social Bookmark Button