1 Reply Latest reply on Oct 4, 2006 6:17 AM by Newsgroup_User

    Keeping your tab place - cfform

    Level 7
      Is there a way to maintain the tab you are on after submitting a form that
      returns to the same page and after the form reloads?


        • 1. Re: Keeping your tab place - cfform
          Level 7
          one way could be to pass the tab state in a hidden form field:

          you would need to set a variable to the current tab state

          <cfset tabname = "thetabid">


          then add a hidden field to your form

          <form>
          ...
          <input type="hidden" name="tabtoload"
          value="<cfoutput>#tabname#</cfoutput>">
          </form>


          then towards the top of the page, when it it reloaded, check to see that
          a value is passed, and if so call the right tab. note, not sure how
          you're doing the tabs so alter that part....

          <cfparam name="form.tabtoload" default="">
          <cfif LEN(form.tabtoload) GT 0>
          <!--- call tab --->
          <!--- insert appropriate code here.... --->
          <cfoutput>#form.tabtoload#</cfoutput>
          <cfif>


          hope that helps. im sure there are other ways to do it too.....



          Wally Kolcz wrote:
          > Is there a way to maintain the tab you are on after submitting a form that
          > returns to the same page and after the form reloads?
          >
          >