Hi Renee, There is lots of information in the cgi scope ie:
<cfdump var="#cgi#" /> So cgi.SCRIPT_NAME will show the url as /data/test.cfm And listLast(cgi.SCRIPT_NAME,'/') will give you the actual file ie test.cfm. Hope this helps, Paul -----Original Message----- From: Renee Spadaro [mailto:[email protected]] Sent: Wednesday, February 18, 2009 10:05 AM To: cf-newbie Subject: Using a URL in an if statement Hello, This is probably pretty easy but... If I want to use the same code on two pages but need it to display differently on each page, how can I use the URL to determine the display? I tried to use IsDefined but the URL is not really a parameter so it didn't work. Basically all I want it to say is: cfif URL = tv.cfm do this else do something else Would somebody please tell me the syntax for the URL? Thank you so much! Renee Spadaro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4372 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
