Skip to main content
WolfShade
Legend
October 1, 2012
Question

Trying to get CFFORM to submit to a different CFDIV - it's not working

  • October 1, 2012
  • 1 reply
  • 1781 views

Hello, everyone.

I have three CFDIVs in a .cfm document - one thin one across the top that contains a CFFORM, and two below it (one on left, one on right).  The lower-left binds on load and displays data from a query.  What I'm trying to do is have the CFFORM submit to the lower-left CFDIV and requery using whatever filter was selected in the CFFORM CFSELECT tag (All orders, Open orders, Working orders, Closed orders.)

I set the TARGET attribute of the CFFORM to the name of the lower-left CFDIV, and it just opens a new window when submit.

I've never worked with these elements, before.  What is the proper way to do what I'm trying to do?

I cannot copy/paste code, here, but I will try to manually type what I have, so far.

index.cfm:

<cfdiv tagName="div" ID="filterForm">

  <cfform target="navLayer" method="post" name="jobsFilter" format="html" id="jobsFilter">

    <cfselect visible="yes" name="status" id="status" query="statusTypes" value="NAME" display="NAME" queryposition="below" onchange="submitForm()">

      <option value="OPEN,WORKING,CLOSED">All</option>

    </cfselect>

  </cfform>

</cfdiv>

<cfdiv tagName="div" ID="navLayer" bind="url:jobslist.cfm" bindOnLoad="yes"></cfdiv>

<cfdiv tagName="div" ID="displayLayer" bind="url:jobs.cfm" bindOnLoad="no"></cfdiv>

I greatly appreciate any advice on this issue.

Thank you,

^_^

    This topic has been closed for replies.

    1 reply

    WolfShade
    WolfShadeAuthor
    Legend
    October 1, 2012

    I'm currently getting it to work by submitting a JavaScript "GET" via ColdFusion.navigate, and changing the form scope to url scope.

    BUT, if anyone can think of a way to do this via POST, please let me know.

    Thanks,

    ^_^