cool thanks. im designer turned cf developer, and these ecma:javascript/actionscript/cfscript thingies are starting to make sense, just workin my way through ;)
..tony Tony Weeg Senior Web Developer Information System Design Navtrak, Inc. Fleet Management Solutions www.navtrak.net 410.548.2337 -----Original Message----- From: Ken Brocx [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 3:34 PM To: CF-Talk Subject: RE: cflocation vs. server side redirect. No tony, The part "// works similar to " Does not have to be there. It's commented piece of code. Anything after // in a cfscript won't be run, it's just commenting. Ken -----Original Message----- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 12:11 PM To: CF-Talk Subject: RE: cflocation vs. server side redirect. <cfscript> GetPageContext().forward("Somepage.cfm?myid=7"); // works similar to asp3.0 server.redirect(whatever.asp) </cfscript> so does this bit about "works similar" need to be there? I havent the faintest idea what was right or wrong in asp3.0 and have seen this same snippet elsewhere...why does everyone always keep that line (works similar....) in there? or do both lines need to be in there? ps....thanks Joee and Bryan. tony Tony Weeg Senior Web Developer Information System Design Navtrak, Inc. Fleet Management Solutions www.navtrak.net 410.548.2337 -----Original Message----- From: Joee Bastian [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 3:04 PM To: CF-Talk Subject: Re: cflocation vs. server side redirect. 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

