1 Reply Latest reply on Feb 23, 2013 5:48 AM by BKBK

    cfdiv submit form refresh list in other cfdiv

    waver

      I have two cfdvs on my page. One has a list and another has a form in it:

       

      <cfdiv name="w1">

        <cfinclude template="list.cfm">

      </cfdiv

       

      <cfdiv name="w2">

        <cfinclude template="form.cfm">

      </cfdiv

       

      When I submit my form, the result is loaded inside div w2. Now I want to refresh the div with the list too. So I tried this at the end of the page that processes the form:

       

      <script>

          Coldfusion.navigate('list.cfm','w1');

      </script>

       

      This didn't work. I get an error:  "... element not found: w1 ...".

       

      Does anyone know how to refresh the list after processing the submitted form data?

        • 1. Re: cfdiv submit form refresh list in other cfdiv
          BKBK Adobe Community Professional & MVP

          You are currently using 3 pages. However, you can achieve what you want in two.

           

          list.cfm

           

          blah

          blah

          blah

           

          form.cfm

           

          <cfdiv name="w1">

            <cfinclude template="list.cfm">

          </cfdiv>

           

          <div id="w2" name="w2">

              <cfif isdefined("form.sbmt")>

                  <cfdump var="#form#">

              </cfif>

              <!--- make form to submit to its own page, that is, to form.cfm --->

              <cfform>

              <cfinput type="text" name="txt">

              <cfinput type="submit" name="sbmt" value="send">

              </cfform>

          </div>