Skip to main content
--Matthew--
Participant
October 2, 2016
Question

CFLayout

  • October 2, 2016
  • 1 reply
  • 195 views

Is there a way to automatically submit the form on change and keep it in the layout. If I do an onchange it opens in a new tab?

<cflayout type="vbox" name="status">

                        <cflayoutarea>

                          <cfform name="myform" format="html" action="Status.cfm" >

                            <span class="ticket-functions">Status:</span>

                            <cfselect name="status" onchange="this.myform.submit()"  >

                                <cfoutput query="status">

                                    <option value="#status.statid#">#status.statname#</option>

                                </cfoutput>

                            </cfselect>

                            <cfinput type="hidden" name="workid" value="1">

                            <cfinput name="prompt" type="submit" value=" " class="finalized-button" >

                            </cfform>

                          </cflayoutarea>

                        </cflayout>

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    October 3, 2016

    --Matthew-- wrote:

    Is there a way to automatically submit the form on change and keep it in the layout.

    Let the form submit to the same page. That is,

    <cfform name="myform" format="html">

    onchange="this.myform.submit()"

    Try instead: onchange="myform.submit()"