> Ok, I'm just using onRequest and it seems to work fine. I > just don't quite understand the difference between onRequest > and onRequestStart, and why you'd use one, the other, or both.
The onRequestStart event runs before your request, while the onRequest event runs INSTEAD of your request! That's why you have to include the targetPage argument if you use onRequest. I'd recommend that you stay away from onRequest unless you have a specific need to rewrite the output of your entire request. If you just want to set variables, you can use the Request scope in onRequestStart or the Application or Session scopes in the onApplicationStart and onSessionStart events respectively. You can only set local variables in onRequest, though, since any other local variables that you set will be local to your Application.CFC rather than to your page. > <cffunction name="onRequest" output="true"> > <cfargument name="targetpage" required="true"> > <!--- CHANGE EACH SEMESTER ---> > <cfset CurrentSemester = "2006SP"> > <cfset CurrentDSN = "eval-2006SP"> > <cfset PreviousSemester = "2005FA"> > <cfset PreviousDSN = "eval-2005FA"> > <cfinclude template="#ARGUMENTS.targetpage#"> > </cffunction> These variables strike me as ideal candidates for the Application scope. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240587 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

