admoortown
asked on
Dynamically change status of selected in CFLAYOUT tag
I was wondering if there was a way to change the status of selected in the CFLAYOUT tag.
im using the tabs for office locations - each tab is a different location.
The end user wants to be able to click on a location from a different page that will take them to the office locations page and the location they have clicked on will be the tab that is shown as selected.
i tried the following but could not get anything to work
<cfif IsDefined("URL.location") AND #URL.location# EQ "belfast">
<cflayoutarea name="Belfast" title="Belfast" selected="true">
<cfelse>
<cflayoutarea name="Belfast" title="Belfast">
</cfif
i also tried putting the if around the selected part of CFLAYOUT
<cflayoutarea name="Belfast" title="Belfast" <cfif IsDefined("URL.location") AND #URL.location# EQ "belfast">selected="true"< /cfif>>
but each one kept throwing back errors and would not work, so if anyone could help that would be great
im using the tabs for office locations - each tab is a different location.
The end user wants to be able to click on a location from a different page that will take them to the office locations page and the location they have clicked on will be the tab that is shown as selected.
i tried the following but could not get anything to work
<cfif IsDefined("URL.location") AND #URL.location# EQ "belfast">
<cflayoutarea name="Belfast" title="Belfast" selected="true">
<cfelse>
<cflayoutarea name="Belfast" title="Belfast">
</cfif
i also tried putting the if around the selected part of CFLAYOUT
<cflayoutarea name="Belfast" title="Belfast" <cfif IsDefined("URL.location") AND #URL.location# EQ "belfast">selected="true"<
but each one kept throwing back errors and would not work, so if anyone could help that would be great
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great answer worked straight away
ASKER