Solved

Dynamically change status of selected in CFLAYOUT tag

Posted on 2008-10-10
3
381 Views
Last Modified: 2013-12-20
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
0
Comment
Question by:admoortown
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 250 total points
Comment Utility
Check this:
<cfif IsDefined("URL.location") AND #URL.location# EQ "belfast">

<cfset belSel="true" >

<cfelse>

<cfset belSel="false" >

</cfif>
 

<cflayoutarea name="Belfast" title="Belfast" selected="#belSel#" >

Open in new window

0
 

Author Comment

by:admoortown
Comment Utility
thanks Zvonko - ill try it out later today hopefully and let you know
0
 

Author Closing Comment

by:admoortown
Comment Utility
Great answer worked straight away
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now