Solved

Dynamically change status of selected in CFLAYOUT tag

Posted on 2008-10-10
3
382 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
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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.htacess file 301 redirects that are strange 4 46
Has my website been infiltrated? 21 64
Is it true tt IIS7 can't support TLSv1.2 if OS is on Win2008 1 55
Coldfusion RegEx 8 56
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
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 manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

910 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

20 Experts available now in Live!

Get 1:1 Help Now