CFMX Server side redirect...
<cfscript>
GetPageContext().forward("Somepage.cfm?myid=7"); // works similar to asp3.0
server.redirect(whatever.asp)
</cfscript>Yes.. the server redirects/passes/controls the flow of the application. Cookies should work fine. Some of the new CFMX books advise this method.. but i think.. the URL doesnt change.. eventhough the redirected page get executed. Joe >From: "Tony Weeg" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: cflocation vs. server side redirect. >Date: Mon, 9 Sep 2002 14:39:14 -0400 > >ok, now I have heard that one is better than the other.... >that's fine, but whats the code for the server side redirect >that we can use inside cfscript tags? > >also, in using the server side redirect, can we set cookies >on action pages, that at the end of the page use a server >side redirect? as opposed to the problem with cflocation at >the end of an action page, and not being able to set cookies >correctly cause of the redirect? > >thanks > >..tony > >Tony Weeg >Senior Web Developer >Information System Design >Navtrak, Inc. >Fleet Management Solutions >www.navtrak.net >410.548.2337 > >-----Original Message----- >From: Tangorre, Michael [mailto:[EMAIL PROTECTED]] >Sent: Monday, September 09, 2002 2:29 PM >To: CF-Talk >Subject: RE: iif usage > > >IIF has its place. Someone correct me if I am wrong, but I thought I >read on this list weeks ago that with MX, IIF was just as fast as CFIF. >All languages have their fans in terms of language specifics and what to >use and what not to use... if you do not like something, don't use it. >If you like it and and the performance from your method is the best it >can be, use it. So......... > >My 2 cents. > >Mike > >-----Original Message----- >From: Joe Eugene [mailto:[EMAIL PROTECTED]] >Sent: Monday, September 09, 2002 2:17 PM >To: CF-Talk >Subject: Re: iif usage > > >Good (humor) Sean...~! I agree there are bad practices... >(evaluate,cflocation, variable prefixes, spaghetti code and some others) >but i dont think you should include IIF in them... > >Joe >----- Original Message ----- >From: "Sean A Corfield" <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Monday, September 09, 2002 1:59 PM >Subject: Re: iif usage > > > > On Sunday, September 8, 2002, at 09:33 , Joe Eugene wrote: > > > I dont agree with Sean or Dave... > > > > That doesn't surprise me Joe :) > > > > > i dont think IIF is necessary but its > > > a very useful function ... "IF USED PROPERLY" > > > > I didn't say it wasn't *useful* - I just said it was bad practice and > > could always be avoided. > > > > > Many of you guys dont agree.. but i personally prefer using IIF and >i > > > use it only when necessary... a good example would be...table row >colors. > > > .. > > > > It is NEVER necessary. You even admit that above! > > > > > i dont use the above for complex logic...write cfscript blocks of >code... > > > i am not very fond of <cfif> contructs... > > > > But you can structure your code to be concise without iif(). Since you > > want alternating colors, you should see that rownum mod 2 will give > > alternating 1, 0, 1, 0 values. So you could construct a two-element >array > > containing the colors you want - do this above the loop over the table > > rows - and then each row just accesses the appropriate element of the > > array. > > > > The main benefit of this approach is that it keeps the color >specification > > separate from the row logic instead of being embedded in the table and >it > > also scales easily to alternately through more colors or alternating >on > > blocks of rows. > > > > And of course it doesn't use iif() which is a big plus in my book. > > > > If you want to use iif() instead of <cfif>, that's up to you. Just >don't > > ask me for a job (or a reference)... :) > > > > Sean A Corfield -- http://www.corfield.org/blog/ > > > > "If you're not annoying somebody, you're not really alive." > > -- Margaret Atwood > > > > > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

