Link to home
Start Free TrialLog in
Avatar of admoortown
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
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of admoortown
admoortown

ASKER

thanks Zvonko - ill try it out later today hopefully and let you know
Great answer worked straight away