I haven't worked with CFMX yet, so my replies are for CF 4.5 and 5.0....

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Bryan Love [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 12:05 PM
To: CF-Talk
Subject: RE: cflocation vs. server side redirect.


server side redirects allow the use of cookies since the page is processed
by the browser.  Cflocations are faster since the relocation happens at the
server and does not have to go to the browser and back again (which is why
cookies don't work with cflocation by the way).

There are many different ways to do a client side redirect:
- use <meta refresh=""> tag
- use javascript window.location=""
- use <body onload="window.location=''"

whatever you choose you must use writeoutput() if you are in a <cfscript>
block or set a variable to use later:
<cfscript>
        if( whatever )
                writeOutput("<body onload=""window.location=''""");
</cfscript>

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 11:39 AM
To: CF-Talk
Subject: cflocation vs. server side redirect.


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
>
> 




______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to