Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfinclude template & cfset

Status
Not open for further replies.

jamestanner

Programmer
Apr 16, 2007
6
GB
help lol, im baffled!!

i have a page structured into areas, a nav bar, footer, main content area, right section etc,

my problem is with the main content pages, i have 11 pages, upon reloading the main page the content should change. my main page uses <cfinclude template="#session.nextclient#.cfm"> on each content page, the first line is <cfset session.nextclien="somethinghere">

this works to a degree, the trouble is its moving to the 2nd page after. eg, if pages were numbered 1 to 11, on page 1, cfset = page 2, on page 2 cfset = page 3.

but when i reload the page, the pages are changing in this order...

1,3,5,7,9,11,2,4,6,8,10 then back to 1 ??

what the hell have i done!! :eek:s

thanks in advance,

James
 
Code:
...on each content page, the first line is 
<cfset session.nextclien="somethinghere">
Most likely, every time you reload the page it changes the session variables.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
hiya, yeah, i realised the onclick etc is done client side etc so the cfsets werent always resetting the variable. i decided to parse the page in the url using catalogue.cfm?client=linksys on the content pages. in themain page my code was

<CFIF isDefined("URL.client") and trim(URL.client) NEQ "">
<CFSET session.nextclient = URL.client>
</CFIF>

<cfinclude template="#session.nextclient#.cfm">

this worked a treat lol :)

thanks for the help ecar!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top