Solved

Dynamically change status of selected in CFLAYOUT tag

Posted on 2008-10-10
3
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 250 total points
ID: 22694940
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
ID: 22701233
thanks Zvonko - ill try it out later today hopefully and let you know
0
 

Author Closing Comment

by:admoortown
ID: 31504964
Great answer worked straight away
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

756 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