Post Form in cflayout Area

Hi there,

I try to send a form values from a cflayout area to another one.

Here is the Code.

The goal is to send value from the form to the center layout.

thanks in advance.
<cflayout name="thelayout" type="border">
 
 
<cflayoutarea name="left" position="left" closable="false" collapsible="true" splitter="true" style="height:100%; width:300px;">
<cfform >
<cfinput type="text" name="type">
<cfinput type="submit" name="submit">
</cfform>
</cflayoutarea>
 
<cflayoutarea name="center" position="center" style="height:100%;">
<cfdump var="#form#">
</cflayoutarea>
 
 
<cflayoutarea name="right" position="right"  closable="false" collapsible="true" splitter="true" style="height:100%; width:60%;">
 
</cflayoutarea>
 
</cflayout>

Open in new window

quarkmikeAsked:
Who is Participating?
 
azadisaryevConnect With a Mentor Commented:
try this:

1) create a simple .cfm page - let's call it formaction.cfm - to process your form. you can just put your <cfdump var="#form#"> in it.

2) add a NAME attribute to your cfform tag if you do not have one. i will assume the NAME is 'myform' for now...

3) in your cffrom change
<cfinput type="submit" name="submit">
to
<input type="button" vane="submit" value="submit" onclick="ColdFusion.navigate('formaction.cfm', 'center', null, null, 'post', 'myform');">

that worked fine in my test.

see full samle code attached.

Azadi
<!--- CFLAYOUT page --->
<cflayout name="thelayout" type="border">
 
<cflayoutarea name="left" position="left" closable="false" collapsible="true" splitter="true" style="height:100%; width:300px;">
<cfform name="myform">
<cfinput type="text" name="type">
<input type="button" vane="submit" value="submit" onclick="ColdFusion.navigate('formaction.cfm', 'center', null, null, 'post', 'myform');">
</cfform>
</cflayoutarea>
 
<cflayoutarea name="center" position="center" style="height:100%;"></cflayoutarea>
 
<cflayoutarea name="right" position="right"  closable="false" collapsible="true" splitter="true" style="height:100%; width:60%;"></cflayoutarea>
 
</cflayout>
 
<!--- form action page (formaction.cfm) --->
<cfdump var="#form#">

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.