Skip navigation
Currently Being Moderated

Can u submit a cfform NOT asynchronously in a cflayoutarea?

Aug 24, 2009 8:21 AM

Hi Gang-

 

Because of a custom framework that I'm forced to use I have a UI that utilizes tabs using the cflayoutarea tags. A few of these cflayoutareas contain cfform calls and I'd like to get those forms to submit to an entirely different page, NOT inside of the tabbed area. I actually want the entire page to refresh and the new page to display just as if I was using a cfform call in a standard .cfm page; I do not want to use the asynchronous call that the cfajax widgets provide. I thought it was something along the lines of how frames behave, simply adding something like "target='new'" but I'm drawing a blank on the javscript equivalent (or a cfml code frag). Anyone have a quickie solution?

 

Thanks in advance,

 

Rich

 
Replies
  • Currently Being Moderated
    Aug 24, 2009 9:54 AM   in reply to richardELeach

    Well my first thought is that the quickest solution is to just not use the ajax at all.

     

    I'm not clearly picturing your process here, but if a <cfform...> tag has a normal action that does not use any ajax calls, then it should behave as you desire.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2012 6:27 PM   in reply to richardELeach

    This worked for me...

     

    CFForm does something strange to the form code on submit.  Make the type of the submit to 'button' and add javascript to submit the form.  I have included the fix below.

     

    <cflayout type="border">

             <cflayoutarea position="top" size="80" align="right">

                 <p>

                     <cfform name="logMeout" action="#CGI.script_name#" method="post" target="_top"> 

                           <cfinput type="button" name="logout" value="Logout" onClick="javascript:document.logMeout.submit()"/>

                       </cfform>

                   </p>

            </cflayoutarea>

     

    Dennis

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points