A = isDefined("url.ItemNumber") B = URL.ItemNumber NEQ 12345 C = CGI.SCRIPT_NAME NEQ '/page.cfm'
CASE 1 url.itemNumber UNDEFINED CGI.ScriptName = 'page.cfm' IF (A AND B) OR C IF (F AND F) OR F IF F OR F FALSE Clause Run CASE 2 url.itemNumber = 12345 cgi.ScriptName = 'index.cfm' IF (A ND B) OR C IF (T AND F) OR F IF F OR F FALSE Clause Run Is this not the result you are getting? Is this not the result you are expecting? -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Dunning ....-----Original Message----- ....From: Cameron Johnson [mailto:[EMAIL PROTECTED] ....Sent: Wednesday, May 25, 2005 8:23 AM ....To: CF-Talk ....Subject: cfif with AND and OR statements .... ....I've got the following cfif statement in one of my header pages: .... ....<cfif (isDefined("URL.ItemNumber") AND URL.ItemNumber NEQ 12345) OR ....(CGI.SCRIPT_NAME NEQ '/page.cfm')> ....show table 1 ....<cfelse> ....show table 2 ....</cfif> .... ....Here are my scenarios: .... ....- when the cfif is combined into one statement, it works correctly ....(meaning I see table 2) when browsing to /page.cfm. But it doesn't work ....when browsing to index.cfm?ItemNumber=12345 .... ....- if I split the statement into two cfif statements, I see table 2 on ....both /page.cfm and index.cfm?ItemNumber=12345 .... ....Any ideas why it's not working on index.cfm?ItemNumber=12345 when the ....statement is combined? Is something wrong with the cfif that I'm not ....seeing? .... ....Appreciate the help. .... ....- Cameron .... .... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207658 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54