RE: cfform issue within cflayout - cflayoutarea

2010-09-20 Thread Stephens, Larry V

Well, this is interesting. I set up a very simple set of pages.

Test.cfm

cflayout type=tab
cflayoutarea name=test title=Test
cfform action=testResponse.cfm method=post
cfinput type=text name=test size=10
input type=submit /
/cfform
/cflayoutarea
/cflayout


testResponse.cfm

cfparam name=FORM.test default=

cfoutput#FORM.test#/cfoutput

cflocation url=testTarget.cfm?show=#FORM.test#


testTarget.cfm

cfparam name=URL.show default=
cfoutput#URL.show#/cfoutput
pI came here/p


When I enter some value in the input the program does indeed return to test.cfm 
and my tab but prints everything from testTarget.cfm 


The issue seems to be in how the form tag is processed by CF. I set up 
another file, test2, using form tags instead of cfform

When you use cfform it's translated to:
form name=CFForm_1 id=CFForm_1 action=testResponse.cfm method=post 
onsubmit=return ColdFusion.Ajax.checkForm(this, _CF_checkCFForm_1,'test') 

Using form there is no translation/processing. It looks like the culprit is 
the onsubmit statement. It works differently than  
ColdFusion.Ajax.submitForm().  The callback function for 
ColdFusion.Ajax.submitForm() returns everything on the target page including 
tags, header info, etc. where this is showing only what I actually output - but 
back into the cflayout area.

And this is where it **really** gets weird: Run the code (test.cfm not 
test2.cfm) and what I see on the screen is my test tab and what I output in 
testTarget.cfm - I see no input box or submit button. BUT, if you view the code 
it's identical to the code before you do the submit. So where are the form 
elements?

Some Ajax guru needs to help with this and tell us how you handle this. (I 
suppose one possibiity is to never actually use a submit button but handle it 
all with ColdFusion.Ajax.submitForm().  )


Larry Stephens







 

-Original Message-
From: Joe None [mailto:drue...@comcast.net] 
Sent: Friday, September 17, 2010 2:20 PM
To: cf-talk
Subject: Re: cfform issue within cflayout - cflayoutarea


Yes I do. 


 Just curious - do you end your processing page with cflocation ? 
 
 Larry Stephens
 




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337229
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cfform issue within cflayout - cflayoutarea

2010-09-17 Thread Stephens, Larry V

Just curious - do you end your processing page with cflocation ? 

Larry Stephens
 

-Original Message-
From: Joe None [mailto:drue...@comcast.net] 
Sent: Friday, September 17, 2010 10:29 AM
To: cf-talk
Subject: cfform issue within cflayout - cflayoutarea


Is there a way to use cfform within a cflayoutarea so that when it's finished 
processing it doesn't reload itself back into the original cflayoutarea? 

I'm using a cfform within a cflayoutarea, I submit my cfform to a processing 
page and after the processing, I TRY to load another page altogether. 
Unfortunately it reloads back into the cflayoutarea (showing two of my cfforms 
and throwing an error). If I use a normal form tag I won't have this issue. 
Using a target with cfform doesn't work. 

Is there a work-around for this issue? Thanks 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337191
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfform issue within cflayout - cflayoutarea

2010-09-17 Thread Joe None

Yes I do. 


 Just curious - do you end your processing page with cflocation ? 
 
 Larry Stephens
 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337195
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm