cflocation tag
Anyone ever have cflocation stop working. It is happening on our MX7 test server but works fine on our production MX7 server. I created a test page with just the cflocation tag with and without the addToken attribute and it just stays on the test page. Thanks, Mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328873 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cflocation tag
Do you have CFFLUSH above the CFLOCATION tag anywhere (like another template or Application.cfm)? Once you flush the page, you can no longer do a CFLOCATION (or CFHEADER, CFCONTENT, etc.). cheers, barneyb On Fri, Dec 4, 2009 at 11:27 AM, Mike Stromme gtrplayer5...@gmail.com wrote: Anyone ever have cflocation stop working. It is happening on our MX7 test server but works fine on our production MX7 server. I created a test page with just the cflocation tag with and without the addToken attribute and it just stays on the test page. Thanks, Mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328874 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cflocation tag
Barney, Thank you, thank you, thank you I had a cfflush in the application.cfm file. thanks, Mike Do you have CFFLUSH above the CFLOCATION tag anywhere (like another template or Application.cfm)? Once you flush the page, you can no longer do a CFLOCATION (or CFHEADER, CFCONTENT, etc.). cheers, barneyb On Fri, Dec 4, 2009 at 11:27 AM, Mike Stromme gtrplayer5...@gmail. com wrote: Anyone ever have cflocation stop working. It is happening on our MX7 test server but works fine on our production MX7 server. I created a test page with just the cflocation tag with and without the addToken attribute and it just stays on the test page. Thanks, Mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328875 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
why doen't sql delete work if it is followed with a cflocation tag
Hello everybody, I have a form with a cancel button. When the user hits the cancel button, I want to perform a sql delete.. immediately after that I want to redirect the user. Here is the code: cfif isDefined(form.CANCELLOCK) and form.CANCELLOCK eq 1 cfquery datasource=db name=qDel delete from table1 where lvalue ='12345' /cfquery cfoutput cflocation url=""> addtoken=no /cfoutput /cfif When I run this code and hit the 'cancel' button... the sql delete does not delete the row from the table. However if I remove the cflocation tag from the code and run it again, it deleted the row from the table. I'm not able to figure out why it is doing this. Can anybody help please Best regards, cfcoder __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
Are you looking directly into the database to see if data was deleted or not? - Original Message - From: cf coder To: CF-Talk Sent: Wednesday, June 16, 2004 10:18 AM Subject: why doen't sql delete work if it is followed with a cflocation tag Hello everybody, I have a form with a cancel button. When the user hits the cancel button, I want to perform a sql delete.. immediately after that I want to redirect the user. Here is the code: cfif isDefined(form.CANCELLOCK) and form.CANCELLOCK eq 1 cfquery datasource=db name=qDel delete from table1 where lvalue ='12345' /cfquery cfoutput cflocation url=""> addtoken=no /cfoutput /cfif When I run this code and hit the 'cancel' button... the sql delete does not delete the row from the table. However if I remove the cflocation tag from the code and run it again, it deleted the row from the table. I'm not able to figure out why it is doing this. Can anybody help please Best regards, cfcoder __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: why doen't sql delete work if it is followed with a cflocation tag
Just a comment, but you don't need the cfoutput around the cflocation John -Original Message- From: brobborb [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:16 AM To: CF-Talk Subject: Re: why doen't sql delete work if it is followed with a cflocation tag Are you looking directly into the database to see if data was deleted or not? - Original Message - From: cf coder To: CF-Talk Sent: Wednesday, June 16, 2004 10:18 AM Subject: why doen't sql delete work if it is followed with a cflocation tag Hello everybody, I have a form with a cancel button. When the user hits the cancel button, I want to perform a sql delete.. immediately after that I want to redirect the user. Here is the code: cfif isDefined(form.CANCELLOCK) and form.CANCELLOCK eq 1 cfquery datasource=db name=qDel delete from table1 where lvalue ='12345' /cfquery cfoutput cflocation url=""> addtoken=no /cfoutput /cfif When I run this code and hit the 'cancel' button... the sql delete does not delete the row from the table. However if I remove the cflocation tag from the code and run it again, it deleted the row from the table. I'm not able to figure out why it is doing this. Can anybody help please Best regards, cfcoder __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
yes I am. If I run the query in sql analyser it deletes the row. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
no, I dont meant running the SQL code to see if it works.I meant, after running the CFM page witht he CFLOCATION intact, how do u heck to see if the data was deleted or not?Do you look directly into the database?Or does it tell you on the processing page? - Original Message - From: cf coder To: CF-Talk Sent: Wednesday, June 16, 2004 10:35 AM Subject: Re: why doen't sql delete work if it is followed with a cflocation tag yes I am. If I run the query in sql analyser it deletes the row. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
After running the cfm page, I'm check in the database table to see if the record is deleted no, I dont meant running the SQL code to see if it works.I meant, after running the CFM page witht he CFLOCATION intact, how do u heck to see if the data was deleted or not?Do you look directly into the database?Or does it tell you on the processing page? - Original Message - From: cf coder To: CF-Talk Sent: Wednesday, June 16, 2004 10:35 AM Subject: Re: why doen't sql delete work if it is followed with a cflocation tag yes I am. If I run the query in sql analyser it deletes the row. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
cf coder wrote: I have a form with a cancel button. You mean input type=reset? That is a client side action, it doesn't touch anything on the server. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: why doen't sql delete work if it is followed with a cflocation tag
I figured out the problem. Basically what was happenning was, it was deleting the record and re-inserting a new one. That's because I have code just above it that inserts a record if the recordcount is 0. I'm sorry guys for the unnecessary hassle. Best regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Can a cflocation effect take place without a cflocation tag?
How about a flash movie that moves to another page? :) John McKown, Owner Delaware.Net, Inc. 30 Old Rudnick Lane, Suite 200 Dover, DE 19901 phone: 302-736-5515 toll free: 888-432-7965 fax: 302-736-5945 e-mail: [EMAIL PROTECTED] icq: 1812513 -Original Message- From: Evan Lavidor [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 29, 2001 5:05 PM To: CF-Talk Subject: RE: Can a cflocation effect take place without a cflocation tag? Could be: 1. a JavaScript redirect 2. a Meta refresh 3. a cferror tag that's catching an error and sending to an error template 4. a site wide error handler in the CF admin that's sending to an error template 5. ... I'm sure there's other stuff but that's four off the top of my head. HTH, Evan -Original Message- From: Hubert Earl [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 29, 2001 3:47 PM To: CF-Talk Subject: Can a cflocation effect take place without a cflocation tag? Hi, Can a cflocation effect take place without a cflocation tag? I've been asked to proofread some problemmatic code which is inexplicably sending users to an error page. However, before I begin to work out why this is happening, I need to work out how it is happening, since I can't find a cflocation tag either within an else or elseif clause, or elsewhere. Sincerely, --- Hubert Earl ICQ#: 16199853 AIM: hubertfme My Jamaican Art, Craft More Online Store: http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Can a cflocation effect take place without a cflocation tag?
Hi, Can a cflocation effect take place without a cflocation tag? I've been asked to proofread some problemmatic code which is inexplicably sending users to an error page. However, before I begin to work out why this is happening, I need to work out how it is happening, since I can't find a cflocation tag either within an else or elseif clause, or elsewhere. Sincerely, --- Hubert Earl ICQ#: 16199853 AIM: hubertfme My Jamaican Art, Craft More Online Store: http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Can a cflocation effect take place without a cflocation tag?
Could be: 1. a JavaScript redirect 2. a Meta refresh 3. a cferror tag that's catching an error and sending to an error template 4. a site wide error handler in the CF admin that's sending to an error template 5. ... I'm sure there's other stuff but that's four off the top of my head. HTH, Evan -Original Message- From: Hubert Earl [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 29, 2001 3:47 PM To: CF-Talk Subject: Can a cflocation effect take place without a cflocation tag? Hi, Can a cflocation effect take place without a cflocation tag? I've been asked to proofread some problemmatic code which is inexplicably sending users to an error page. However, before I begin to work out why this is happening, I need to work out how it is happening, since I can't find a cflocation tag either within an else or elseif clause, or elsewhere. Sincerely, --- Hubert Earl ICQ#: 16199853 AIM: hubertfme My Jamaican Art, Craft More Online Store: http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: cfif statements in a cflocation tag=icky url
i have a form which takes a few input fields, then passes them to a 2nd template for evaluation, a url is built that needs to include the variables from the form if they exist, which is then sent via cflocation to a 3rd template for the appropriate action. on the 2nd template, i am using cflocation with a few cfif statements inside it to determine if the form fields were present and build the url accordingly, if i enter a line break before the cfif, cf does not pass the values in the url, the only way it seems to want to work is if i run the whole thing together, cf includes the passed variables in the url, but the url looks terrible as it includes the cfif code please tell me i am missing something obvious or there is a cleaner way to do this. ---cf code--- cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username#cfif #isDefined("attributes.dsn1")#dsn1=#attributes.dsn1#cfelseif #isDefined("attributes.dsn2")#dsn2=#attributes.dsn2#cfelseif #isDefined("attributes.dsn3")#dsn3=#attributes.dsn3#/cfif" --- url produced from above code--- http://serverip/mydir/mytemplate.cfm?username=user23cfif%20YESdsn1=blah1 cfelseif%20YESdsn2=blah2cfelseif%20YESdsn3=blah3/cfif --- (serverip was edited for this post) -- Stephenie Hamilton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfif statements in a cflocation tag=icky url
A cleaner way to do this is to place your cfif block just before your cflocation tag, and write your URL QueryString to a variable there. Then append that variable to the url in your cflocation tag. If the variables being appended might have spaces or special characters in them, be sure to perform URLEncodedFormat() on the variable before appending it. ~Simon Simon Horwith Allaire Certified ColdFusion Instructor Certified ColdFusion Developer Fig Leaf Software 1400 16th St NW, # 220 Washington DC 20036 202.797.6570 (direct line) www.figleaf.com -Original Message- From: Stephenie [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 01, 2001 12:09 PM To: CF-Talk Subject: OT: cfif statements in a cflocation tag=icky url i have a form which takes a few input fields, then passes them to a 2nd template for evaluation, a url is built that needs to include the variables from the form if they exist, which is then sent via cflocation to a 3rd template for the appropriate action. on the 2nd template, i am using cflocation with a few cfif statements inside it to determine if the form fields were present and build the url accordingly, if i enter a line break before the cfif, cf does not pass the values in the url, the only way it seems to want to work is if i run the whole thing together, cf includes the passed variables in the url, but the url looks terrible as it includes the cfif code please tell me i am missing something obvious or there is a cleaner way to do this. ---cf code--- cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username#cfif #isDefined("attributes.dsn1")#dsn1=#attributes.dsn1#cfelseif #isDefined("attributes.dsn2")#dsn2=#attributes.dsn2#cfelseif #isDefined("attributes.dsn3")#dsn3=#attributes.dsn3#/cfif" --- url produced from above code--- http://serverip/mydir/mytemplate.cfm?username=user23cfif%20YESdsn1=blah1 cfelseif%20YESdsn2=blah2cfelseif%20YESdsn3=blah3/cfif --- (serverip was edited for this post) -- Stephenie Hamilton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: cfif statements in a cflocation tag=icky url
Don't do the CFIFs inside the CFLOCATION - instead, build up a text string using your CFIFs, then use that string in the CFLOCATION for your URL. Nesting tags within other tags = boo-boo. - Original Message - From: "Stephenie" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 10:08 AM Subject: OT: cfif statements in a cflocation tag=icky url i have a form which takes a few input fields, then passes them to a 2nd template for evaluation, a url is built that needs to include the variables from the form if they exist, which is then sent via cflocation to a 3rd template for the appropriate action. on the 2nd template, i am using cflocation with a few cfif statements inside it to determine if the form fields were present and build the url accordingly, if i enter a line break before the cfif, cf does not pass the values in the url, the only way it seems to want to work is if i run the whole thing together, cf includes the passed variables in the url, but the url looks terrible as it includes the cfif code please tell me i am missing something obvious or there is a cleaner way to do this. ---cf code--- cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username#cfif #isDefined("attributes.dsn1")#dsn1=#attributes.dsn1#cfelseif #isDefined("attributes.dsn2")#dsn2=#attributes.dsn2#cfelseif #isDefined("attributes.dsn3")#dsn3=#attributes.dsn3#/cfif" --- url produced from above code--- http://serverip/mydir/mytemplate.cfm?username=user23cfif%20YESdsn1=blah1 cfelseif%20YESdsn2=blah2cfelseif%20YESdsn3=blah3/cfif --- (serverip was edited for this post) -- Stephenie Hamilton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: OT: cfif statements in a cflocation tag=icky url
At 12:08 PM 2/1/01 -0500, you wrote: i have a form which takes a few input fields, then passes them to a 2nd template for evaluation, a url is built that needs to include the variables from the form if they exist, which is then sent via cflocation to a 3rd template for the appropriate action. on the 2nd template, i am using cflocation with a few cfif statements inside it to determine if the form fields were present and build the url accordingly, if i enter a line break before the cfif, cf does not pass the values in the url, the only way it seems to want to work is if i run the whole thing together, cf includes the passed variables in the url, but the url looks terrible as it includes the cfif code please tell me i am missing something obvious or there is a cleaner way to do this. ---cf code--- cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username#cfif #isDefined("attributes.dsn1")#dsn1=#attributes.dsn1#cfelseif #isDefined("attributes.dsn2")#dsn2=#attributes.dsn2#cfelseif #isDefined("attributes.dsn3")#dsn3=#attributes.dsn3#/cfif" --- url produced from above code--- http://serverip/mydir/mytemplate.cfm?username=user23cfif%20YESdsn1=blah1 cfelseif%20YESdsn2=blah2cfelseif%20YESdsn3=blah3/cfif There are a couple of security issues with this and I would avoid it at all costs. First of all, you never want to have brackets in your URL-- allowing brackets to be passed in the url opens you up to cross-site scripting. Cross-site scripting is bad bad bad. Serious server hacks available. Second security issue is that you are sending variables called dsnsomenumber. Even if you want to pass a datasource reference you want to make sure that the reference doesn't shout "Hey look! It's a datasource!" Again, you don't want to HELP people hack your server. OK, now what you may be having a problem with here is not actually that you want to send CFIF statements through the URL, but rather that you want to check these things and build the URL that way. If this is what you want and you nest the CFif tags inside the other CF tags, you will not get what you are expecting. Instead, you should build the URL in another part of the page and send the url to the cflocation tag like this: cfset appendtourl="" cfif isDefined("attributes.dsn1")cfset appendtourl="dsn1=#attributes.dsn1#" cfelseif isdefined("attributes.dsn2")cfset appendtourl="dsn2=#attributes.dsn2#" cfelseif isDefined("attributes.dsn3")cfset appendtourl="dsn3=#attributes.dsn3#" /cfif cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username##appendtourl#" Does this fix your problem? Never ever ever send or in a URL. If you do that, people will realize they can hack your site and they'll try just to see what happens. It's basically an invitation. If you need to detect which dsn number is being passed, you should put the code for that in the target page. Now announcing my newly updated website http://www.blivit.org/mr_urc/index.cfm Resume: http://www.blivit.org/mr_urc/resume.cfm ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfif statements in a cflocation tag=icky url
DOH! thanks guys :) -- Stephenie Hamilton Senior ColdFusion Administrator Express Technologies, Inc. want CF_Freedom? try CFXHosting.com Winner of the 2000 ColdFusion Developer's Journal Best ColdFusion Web Host!! -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 01, 2001 1:36 PM To: CF-Talk Subject: Re: cfif statements in a cflocation tag=icky url Don't do the CFIFs inside the CFLOCATION - instead, build up a text string using your CFIFs, then use that string in the CFLOCATION for your URL. Nesting tags within other tags = boo-boo. - Original Message - From: "Stephenie" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 10:08 AM Subject: OT: cfif statements in a cflocation tag=icky url i have a form which takes a few input fields, then passes them to a 2nd template for evaluation, a url is built that needs to include the variables from the form if they exist, which is then sent via cflocation to a 3rd template for the appropriate action. on the 2nd template, i am using cflocation with a few cfif statements inside it to determine if the form fields were present and build the url accordingly, if i enter a line break before the cfif, cf does not pass the values in the url, the only way it seems to want to work is if i run the whole thing together, cf includes the passed variables in the url, but the url looks terrible as it includes the cfif code please tell me i am missing something obvious or there is a cleaner way to do this. ---cf code--- cflocation url="http://#attributes.serverip#/mydir/mytemplate.cfm?username=#attributes. username#cfif #isDefined("attributes.dsn1")#dsn1=#attributes.dsn1#cfelseif #isDefined("attributes.dsn2")#dsn2=#attributes.dsn2#cfelseif #isDefined("attributes.dsn3")#dsn3=#attributes.dsn3#/cfif" --- url produced from above code--- http://serverip/mydir/mytemplate.cfm?username=user23cfif%20YESdsn1=blah1 cfelseif%20YESdsn2=blah2cfelseif%20YESdsn3=blah3/cfif --- (serverip was edited for this post) -- Stephenie Hamilton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Help with Cflocation tag working in a framed setting
I have a cflocation tag in my application.cfm file so that if a user tries to access a certain page by clicking on that pages link and that user is not logged in to the website then the application page sends the user back to the home page or login screen. problem being that the link the user clicks on is with a frame setting and the relocation causes the entire window to reset to the page I am wanting a non user to be sent to. I need only the frame that the link resides in to reset rather than the entire page normally I would use target="_self" in a traditional html setting to achieve this but I am at a loss under cf what to do your advice would as always be really appreciated Kind Regards Claude Raiola (Director) AustralianAccommodation.com Pty. Ltd. Website: www.AustralianAccommodation.com Email: [EMAIL PROTECTED] -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.