Remove the quotes around URL.PAGE. Right now you're setting PAGE to the
value "url.page" (which I assume you don't want to do) instead of the value
contained in url.page.
Also add a break; as the last statement in each of the cases. Without the
breaks, the statement will continue processing the statements in the other
cases, until it reaches the end of the switch statement or a break.
switch(page)
{
page = url.page;
switch(page)
{
case 1:
{
// some stuff
break;
}
case 2:
{
// some other stuff
break;
}
default:
{
// default stuff
break;
}
}
}
Hope that helps!
~~~~~~~~~~~~~~~~~~~~~
Rob Mulcahey
Programmer
James Tower
507-386-9380
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: Bill Killillay [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 6:20 PM
To: Cf-Talk
Subject: CFSCRIPT Question??
When I pass this page the URL variable of 1 through what ever or nothing
they all return the default value. Why is that? There is nothing to this
page, but for some reason every time it will either give me the default case
value, or if I take the default out it gives me number 8. Every time!
<CFSCRIPT>
PAGE = "URL.PAGE";
SWITCH (PAGE){
/* Home page for resilient */
CASE 1 :
COPY_BLOCK = 'resilient_home.cfm';
FOOTER = 'resilient_footer.cfm';
BACKGROUND =
'background_resilient_home.gif';
TITLE = 'Resilient Home';
// Resilient search page
CASE 2 :
COPY_BLOCK = 'resilient_search.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND = 'background.gif';
TITLE = 'Resilient Product Search';
// Pages 3 through 6 are Resilient Technical pages
CASE 3 :
COPY_BLOCK = 'resilient_technical.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND =
'background_resilient_technical.gif';
TITLE = 'Resilient - Technical';
CASE 4 :
COPY_BLOCK =
'resilient_professional_installation_guide.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND = 'background.gif';
TITLE = 'Resilient - Professional
Installation Guide';
CASE 5 :
COPY_BLOCK = 'resilient_installations.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND = 'background.gif';
TITLE = 'Resilient - Installation';
CASE 6 :
COPY_BLOCK =
'resilient_matting_systems.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND = 'background.gif';
TITLE = 'Resilient - Matting Systems';
// Pages 7 through 8 is Resilient Installation Profiles
CASE 7 :
COPY_BLOCK =
'resilient_installation_profiles.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND =
'background_resilient_home.gif';
TITLE = 'Resilient - Installation Profiles';
CASE 8 :
COPY_BLOCK =
'resilient_installation_profiles_drill_down.cfm';
FOOTER = 'main_footer.cfm';
BACKGROUND = 'background.gif';
TITLE = 'Resilient - Installation Profiles';
DEFAULT :
TITLE = '';
}
</CFSCRIPT>
<html>
<head>
<title><CFOUTPUT>#TITLE#</CFOUTPUT></title>
</head>
<body>
<CFOUTPUT>#TITLE#</CFOUTPUT>
</body>
</html>
Bill Killillay
ICQ @ 8425781
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
"An investment in Knowledge always pays the best interest."
-Benjamin Franklin-
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Get Paid to Surf the Web. It's free, easy and fun.
Sign up for AllAdvantage.com at
http://alladvantage.com/go.asp?refid=FIB-034
Most of us are on it every day all day anyway, why not give
yourself a pay raise for 25 hours a month.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.